Commit 7dd26263 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: battery-gb: move the battery protocol out to a stand-alone module

This moves the battery class protocol to be a stand-alone kernel module.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
parent 66b676fd
...@@ -12,12 +12,12 @@ greybus-y := core.o \ ...@@ -12,12 +12,12 @@ greybus-y := core.o \
pwm-gb.o \ pwm-gb.o \
sdio-gb.o \ sdio-gb.o \
uart-gb.o \ uart-gb.o \
battery-gb.o \
usb-gb.o usb-gb.o
obj-m += greybus.o obj-m += greybus.o
obj-m += i2c-gb.o obj-m += i2c-gb.o
obj-m += vibrator-gb.o obj-m += vibrator-gb.o
obj-m += battery-gb.o
obj-m += es1-ap-usb.o obj-m += es1-ap-usb.o
KERNELVER ?= $(shell uname -r) KERNELVER ?= $(shell uname -r)
......
...@@ -367,12 +367,6 @@ static struct gb_protocol battery_protocol = { ...@@ -367,12 +367,6 @@ static struct gb_protocol battery_protocol = {
.request_recv = NULL, /* no incoming requests */ .request_recv = NULL, /* no incoming requests */
}; };
int gb_battery_protocol_init(void) gb_protocol_driver(&battery_protocol);
{
return gb_protocol_register(&battery_protocol);
}
void gb_battery_protocol_exit(void) MODULE_LICENSE("GPL v2");
{
gb_protocol_deregister(&battery_protocol);
}
...@@ -183,10 +183,6 @@ bool gb_protocol_init(void) ...@@ -183,10 +183,6 @@ bool gb_protocol_init(void)
{ {
bool ret = true; bool ret = true;
if (gb_battery_protocol_init()) {
pr_err("error initializing battery protocol\n");
ret = false;
}
if (gb_gpio_protocol_init()) { if (gb_gpio_protocol_init()) {
pr_err("error initializing gpio protocol\n"); pr_err("error initializing gpio protocol\n");
ret = false; ret = false;
...@@ -216,5 +212,4 @@ void gb_protocol_exit(void) ...@@ -216,5 +212,4 @@ void gb_protocol_exit(void)
gb_sdio_protocol_exit(); gb_sdio_protocol_exit();
gb_uart_protocol_exit(); gb_uart_protocol_exit();
gb_gpio_protocol_exit(); gb_gpio_protocol_exit();
gb_battery_protocol_exit();
} }
...@@ -51,9 +51,6 @@ void gb_protocol_put(struct gb_protocol *protocol); ...@@ -51,9 +51,6 @@ void gb_protocol_put(struct gb_protocol *protocol);
* Declared here for now. They could be added via modules, or maybe * Declared here for now. They could be added via modules, or maybe
* just use initcalls (which level?). * just use initcalls (which level?).
*/ */
extern int gb_battery_protocol_init(void);
extern void gb_battery_protocol_exit(void);
extern int gb_gpio_protocol_init(void); extern int gb_gpio_protocol_init(void);
extern void gb_gpio_protocol_exit(void); extern void gb_gpio_protocol_exit(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