Create separate module for usb gpbridge driver.
Tested on EVT 1.5 by inserting GP test module, all the devices were
enumerated correctly.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
operation.o \
legacy.o
-gb-phy-y := gpbridge.o \
- usb.o
+gb-phy-y := gpbridge.o
# Prefix all modules with gb-
gb-vibrator-y := vibrator.o
gb-pwm-y := pwm.o
gb-gpio-y := gpio.o
gb-i2c-y := i2c.o
+gb-usb-y := usb.o
obj-m += greybus.o
obj-m += gb-phy.o
obj-m += gb-pwm.o
obj-m += gb-gpio.o
obj-m += gb-i2c.o
+obj-m += gb-usb.o
KERNELVER ?= $(shell uname -r)
KERNELDIR ?= /lib/modules/$(KERNELVER)/build
goto error_gpbridge;
}
- if (gb_usb_driver_init()) {
- pr_err("error initializing usb driver\n");
- goto error_usb;
- }
-
return 0;
-error_usb:
- greybus_deregister(&gb_gpbridge_driver);
error_gpbridge:
bus_unregister(&gpbridge_bus_type);
ida_destroy(&gpbridge_id);
static void __exit gpbridge_exit(void)
{
- gb_usb_driver_exit();
-
greybus_deregister(&gb_gpbridge_driver);
bus_unregister(&gpbridge_bus_type);
ida_destroy(&gpbridge_id);
gb_gpbridge_deregister(&__driver); \
}
-extern int gb_usb_driver_init(void);
-extern void gb_usb_driver_exit(void);
-
/**
* module_gpbridge_driver() - Helper macro for registering a gpbridge driver
* @__gpbridge_driver: gpbridge_driver structure
{ GPBRIDGE_PROTOCOL(GREYBUS_PROTOCOL_USB) },
{ },
};
+MODULE_DEVICE_TABLE(gpbridge, gb_usb_id_table);
static struct gpbridge_driver usb_driver = {
.name = "usb",
.remove = gb_usb_remove,
.id_table = gb_usb_id_table,
};
-gb_gpbridge_builtin_driver(usb_driver);
+
+module_gpbridge_driver(usb_driver);
+MODULE_LICENSE("GPL v2");