The i2c protocol belongs in the gpbridge driver, so move it
there.
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Reviewed-by: Alex Elder <elder@linaro.org>
uart-gb.o \
pwm-gb.o \
gpio-gb.o \
+ i2c-gb.o \
usb-gb.o
obj-m += greybus.o
obj-m += gpbridge.o
-obj-m += i2c-gb.o
obj-m += vibrator-gb.o
obj-m += battery-gb.o
obj-m += es1-ap-usb.o
pr_err("error initializing usb protocol\n");
goto error_usb;
}
+ if (gb_i2c_protocol_init()) {
+ pr_err("error initializing usb protocol\n");
+ goto error_i2c;
+ }
return 0;
+error_i2c:
+ gb_usb_protocol_exit();
error_usb:
gb_sdio_protocol_exit();
error_sdio:
static void __exit gpbridge_exit(void)
{
+ gb_i2c_protocol_exit();
gb_usb_protocol_exit();
gb_sdio_protocol_exit();
gb_uart_protocol_exit();
.request_recv = NULL, /* no incoming requests */
};
-gb_protocol_driver(&i2c_protocol);
+int gb_i2c_protocol_init(void)
+{
+ return gb_protocol_register(&i2c_protocol);
+}
-MODULE_LICENSE("GPL v2");
+void gb_i2c_protocol_exit(void)
+{
+ gb_protocol_deregister(&i2c_protocol);
+}
extern int gb_usb_protocol_init(void);
extern void gb_usb_protocol_exit(void);
+extern int gb_i2c_protocol_init(void);
+extern void gb_i2c_protocol_exit(void);
+
#define gb_protocol_driver(__protocol) \
static int __init protocol_init(void) \
{ \