API: Add binding accessors to generic struct mctp_binding
Rather than have every binding include their own wrappers around
binding<->core functions, introduce an accessor to retrieve the struct
mctp_binding from each.
This means we no longer need the binding-specific registration
callbacks. However, we do now need a ->start callback, to allow bindings
to perform post-registration init.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Change-Id: I6cee9e93f37520f85c155a0ca34017cc0675552c
diff --git a/utils/mctp-demux-daemon.c b/utils/mctp-demux-daemon.c
index f64f029..96d9753 100644
--- a/utils/mctp-demux-daemon.c
+++ b/utils/mctp-demux-daemon.c
@@ -145,7 +145,7 @@
if (rc)
return -1;
- mctp_serial_register_bus(serial, mctp, eid);
+ mctp_register_bus(mctp, mctp_binding_serial_core(serial), eid);
binding->data = serial;
@@ -179,7 +179,8 @@
return -1;
}
- mctp_astlpc_register_bus(astlpc, mctp, eid);
+ mctp_register_bus(mctp, mctp_binding_astlpc_core(astlpc), eid);
+
binding->data = astlpc;
return 0;
}