This moves the battery class protocol to be a stand-alone kernel module.
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Reviewed-by: Alex Elder <elder@linaro.org>
pwm-gb.o \
sdio-gb.o \
uart-gb.o \
- battery-gb.o \
usb-gb.o
obj-m += greybus.o
obj-m += i2c-gb.o
obj-m += vibrator-gb.o
+obj-m += battery-gb.o
obj-m += es1-ap-usb.o
KERNELVER ?= $(shell uname -r)
.request_recv = NULL, /* no incoming requests */
};
-int gb_battery_protocol_init(void)
-{
- return gb_protocol_register(&battery_protocol);
-}
+gb_protocol_driver(&battery_protocol);
-void gb_battery_protocol_exit(void)
-{
- gb_protocol_deregister(&battery_protocol);
-}
+MODULE_LICENSE("GPL v2");
{
bool ret = true;
- if (gb_battery_protocol_init()) {
- pr_err("error initializing battery protocol\n");
- ret = false;
- }
if (gb_gpio_protocol_init()) {
pr_err("error initializing gpio protocol\n");
ret = false;
gb_sdio_protocol_exit();
gb_uart_protocol_exit();
gb_gpio_protocol_exit();
- gb_battery_protocol_exit();
}
* Declared here for now. They could be added via modules, or maybe
* 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 void gb_gpio_protocol_exit(void);