Commit c9e9de26 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: hid: hid should not be part of the bridged-phy driver.

HID is a stand-alone greybus protocol, not part of the bridged-phy
protocols, so make it a stand-alone kernel module.

Note, some hard-coded android init script might need to be changed to
load the gb-hid.ko kernel module now.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent a5202862
...@@ -18,7 +18,6 @@ gb-phy-y := gpbridge.o \ ...@@ -18,7 +18,6 @@ gb-phy-y := gpbridge.o \
uart.o \ uart.o \
pwm.o \ pwm.o \
gpio.o \ gpio.o \
hid.o \
i2c.o \ i2c.o \
spi.o \ spi.o \
usb.o usb.o
...@@ -29,6 +28,7 @@ gb-battery-y := battery.o ...@@ -29,6 +28,7 @@ gb-battery-y := battery.o
gb-loopback-y := loopback.o gb-loopback-y := loopback.o
gb-light-y := light.o gb-light-y := light.o
gb-raw-y := raw.o gb-raw-y := raw.o
gb-hid-y := hid.o
gb-es1-y := es1.o gb-es1-y := es1.o
gb-es2-y := es2.o gb-es2-y := es2.o
gb-db3-y := db3-platform.o gb-db3-y := db3-platform.o
...@@ -39,6 +39,7 @@ obj-m += gb-vibrator.o ...@@ -39,6 +39,7 @@ obj-m += gb-vibrator.o
obj-m += gb-battery.o obj-m += gb-battery.o
obj-m += gb-loopback.o obj-m += gb-loopback.o
obj-m += gb-light.o obj-m += gb-light.o
obj-m += gb-hid.o
obj-m += gb-raw.o obj-m += gb-raw.o
obj-m += gb-es1.o obj-m += gb-es1.o
obj-m += gb-es2.o obj-m += gb-es2.o
......
...@@ -49,15 +49,9 @@ static int __init gpbridge_init(void) ...@@ -49,15 +49,9 @@ static int __init gpbridge_init(void)
pr_err("error initializing spi protocol\n"); pr_err("error initializing spi protocol\n");
goto error_spi; goto error_spi;
} }
if (gb_hid_protocol_init()) {
pr_err("error initializing hid protocol\n");
goto error_hid;
}
return 0; return 0;
error_hid:
gb_spi_protocol_exit();
error_spi: error_spi:
gb_i2c_protocol_exit(); gb_i2c_protocol_exit();
error_i2c: error_i2c:
...@@ -77,7 +71,6 @@ module_init(gpbridge_init); ...@@ -77,7 +71,6 @@ module_init(gpbridge_init);
static void __exit gpbridge_exit(void) static void __exit gpbridge_exit(void)
{ {
gb_hid_protocol_exit();
gb_spi_protocol_exit(); gb_spi_protocol_exit();
gb_i2c_protocol_exit(); gb_i2c_protocol_exit();
gb_usb_protocol_exit(); gb_usb_protocol_exit();
......
...@@ -474,4 +474,6 @@ static struct gb_protocol hid_protocol = { ...@@ -474,4 +474,6 @@ static struct gb_protocol hid_protocol = {
.request_recv = gb_hid_irq_handler, .request_recv = gb_hid_irq_handler,
}; };
gb_builtin_protocol_driver(hid_protocol); gb_protocol_driver(&hid_protocol);
MODULE_LICENSE("GPL v2");
...@@ -82,9 +82,6 @@ extern void gb_i2c_protocol_exit(void); ...@@ -82,9 +82,6 @@ extern void gb_i2c_protocol_exit(void);
extern int gb_spi_protocol_init(void); extern int gb_spi_protocol_init(void);
extern void gb_spi_protocol_exit(void); extern void gb_spi_protocol_exit(void);
extern int gb_hid_protocol_init(void);
extern void gb_hid_protocol_exit(void);
/* __protocol: Pointer to struct gb_protocol */ /* __protocol: Pointer to struct gb_protocol */
#define gb_protocol_driver(__protocol) \ #define gb_protocol_driver(__protocol) \
static int __init protocol_init(void) \ static int __init protocol_init(void) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment