summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/uart.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-05-09 18:15:11 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-14 19:13:57 +0200
commit66b9e09e28b0c32d9b071fc9084bbb8880b88d74 (patch)
treef4516abc1fe07b436138c6aafca44cfc19a4e232 /drivers/staging/greybus/uart.c
parentbebc013bafed3cc42eada99da0a924e46b0cd0c3 (diff)
greybus: uart: Create separate module
Create separate module for uart 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>
Diffstat (limited to 'drivers/staging/greybus/uart.c')
-rw-r--r--drivers/staging/greybus/uart.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index 0d8fcb55d9aa..aa28ce5c4fb0 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -804,6 +804,7 @@ static const struct gpbridge_device_id gb_uart_id_table[] = {
{ GPBRIDGE_PROTOCOL(GREYBUS_PROTOCOL_UART) },
{ },
};
+MODULE_DEVICE_TABLE(gpbridge, gb_uart_id_table);
static struct gpbridge_driver uart_driver = {
.name = "uart",
@@ -812,7 +813,7 @@ static struct gpbridge_driver uart_driver = {
.id_table = gb_uart_id_table,
};
-int gb_uart_driver_init(void)
+static int gb_uart_driver_init(void)
{
int ret;
@@ -828,9 +829,13 @@ int gb_uart_driver_init(void)
return 0;
}
+module_init(gb_uart_driver_init);
-void gb_uart_driver_exit(void)
+static void gb_uart_driver_exit(void)
{
gb_gpbridge_deregister(&uart_driver);
gb_tty_exit();
}
+
+module_exit(gb_uart_driver_exit);
+MODULE_LICENSE("GPL v2");