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/libmctp.h b/libmctp.h
index 523891f..b36a943 100644
--- a/libmctp.h
+++ b/libmctp.h
@@ -97,6 +97,7 @@
struct mctp *mctp;
int pkt_size;
int pkt_pad;
+ int (*start)(struct mctp_binding *binding);
int (*tx)(struct mctp_binding *binding,
struct mctp_pktbuf *pkt);
};