Start using gb_gpbridge_protocol_init() in gpbridge drivers.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
.request_recv = gb_gpio_request_recv,
};
-int gb_gpio_protocol_init(void)
-{
- return gb_protocol_register(&gpio_protocol);
-}
-
-void gb_gpio_protocol_exit(void)
-{
- gb_protocol_deregister(&gpio_protocol);
-}
+gb_gpbridge_protocol_driver(gpio_protocol);
.request_recv = gb_hid_irq_handler,
};
-int gb_hid_protocol_init(void)
-{
- return gb_protocol_register(&hid_protocol);
-}
-
-void gb_hid_protocol_exit(void)
-{
- gb_protocol_deregister(&hid_protocol);
-}
+gb_gpbridge_protocol_driver(hid_protocol);
.request_recv = NULL, /* no incoming requests */
};
-int gb_i2c_protocol_init(void)
-{
- return gb_protocol_register(&i2c_protocol);
-}
-
-void gb_i2c_protocol_exit(void)
-{
- gb_protocol_deregister(&i2c_protocol);
-}
+gb_gpbridge_protocol_driver(i2c_protocol);
.request_recv = NULL, /* no incoming requests */
};
-int gb_pwm_protocol_init(void)
-{
- return gb_protocol_register(&pwm_protocol);
-}
-
-void gb_pwm_protocol_exit(void)
-{
- gb_protocol_deregister(&pwm_protocol);
-}
+gb_gpbridge_protocol_driver(pwm_protocol);
.request_recv = NULL, /* no incoming requests */
};
-int gb_sdio_protocol_init(void)
-{
- return gb_protocol_register(&sdio_protocol);
-}
-
-void gb_sdio_protocol_exit(void)
-{
- gb_protocol_deregister(&sdio_protocol);
-}
+gb_gpbridge_protocol_driver(sdio_protocol);
.request_recv = NULL,
};
-int gb_spi_protocol_init(void)
-{
- return gb_protocol_register(&spi_protocol);
-}
-
-void gb_spi_protocol_exit(void)
-{
- gb_protocol_deregister(&spi_protocol);
-}
+gb_gpbridge_protocol_driver(spi_protocol);
.request_recv = NULL, /* FIXME we have 2 types of requests!!! */
};
-int gb_uart_protocol_init(void)
-{
- return gb_protocol_register(&uart_protocol);
-}
-
-void gb_uart_protocol_exit(void)
-{
- gb_protocol_deregister(&uart_protocol);
-}
+gb_gpbridge_protocol_driver(uart_protocol);
.request_recv = NULL, /* FIXME we have requests!!! */
};
-int gb_usb_protocol_init(void)
-{
- return gb_protocol_register(&usb_protocol);
-}
-
-void gb_usb_protocol_exit(void)
-{
- gb_protocol_deregister(&usb_protocol);
-}
+gb_gpbridge_protocol_driver(usb_protocol);