diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-02-17 10:02:32 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-07 19:11:14 -0500 |
commit | 49c56bfcb7c44ec67c4e2d3a54656335e62bf3b8 (patch) | |
tree | a30ba39250e89375f6c963ecb58442b750f9ed55 /drivers/tty/serial/8250 | |
parent | 88725e917d2e54d0c1e1db01f643f085c3b7d1d0 (diff) |
Revert "drivers/tty/serial: make 8250/8250_ingenic.c explicitly non-modular"
This reverts commit cafe1ac64023 ("drivers/tty: make serial
8250_ingenic.c explicitly non-modular"), which attempted to remove dead
code but did not have the desired effect when the main 8250 driver was
a loadable module itself.
This would normally result in a link error, but as the entire
drivers/tty/serial/8250/ directory is only entered when CONFIG_SERIAL_8250
is set, we never notice that the driver does not get built in this
configuration.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r-- | drivers/tty/serial/8250/8250_ingenic.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/serial/8250/8250_ingenic.c index b4e1d39805b2..97b78558caed 100644 --- a/drivers/tty/serial/8250/8250_ingenic.c +++ b/drivers/tty/serial/8250/8250_ingenic.c | |||
@@ -4,8 +4,6 @@ | |||
4 | * | 4 | * |
5 | * Ingenic SoC UART support | 5 | * Ingenic SoC UART support |
6 | * | 6 | * |
7 | * Author: Paul Burton <paul.burton@imgtec.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
11 | * Free Software Foundation; either version 2 of the License, or (at your | 9 | * Free Software Foundation; either version 2 of the License, or (at your |
@@ -20,7 +18,7 @@ | |||
20 | #include <linux/console.h> | 18 | #include <linux/console.h> |
21 | #include <linux/io.h> | 19 | #include <linux/io.h> |
22 | #include <linux/libfdt.h> | 20 | #include <linux/libfdt.h> |
23 | #include <linux/init.h> | 21 | #include <linux/module.h> |
24 | #include <linux/of.h> | 22 | #include <linux/of.h> |
25 | #include <linux/of_fdt.h> | 23 | #include <linux/of_fdt.h> |
26 | #include <linux/of_device.h> | 24 | #include <linux/of_device.h> |
@@ -303,6 +301,16 @@ out: | |||
303 | return err; | 301 | return err; |
304 | } | 302 | } |
305 | 303 | ||
304 | static int ingenic_uart_remove(struct platform_device *pdev) | ||
305 | { | ||
306 | struct ingenic_uart_data *data = platform_get_drvdata(pdev); | ||
307 | |||
308 | serial8250_unregister_port(data->line); | ||
309 | clk_disable_unprepare(data->clk_module); | ||
310 | clk_disable_unprepare(data->clk_baud); | ||
311 | return 0; | ||
312 | } | ||
313 | |||
306 | static const struct ingenic_uart_config jz4740_uart_config = { | 314 | static const struct ingenic_uart_config jz4740_uart_config = { |
307 | .tx_loadsz = 8, | 315 | .tx_loadsz = 8, |
308 | .fifosize = 16, | 316 | .fifosize = 16, |
@@ -325,13 +333,19 @@ static const struct of_device_id of_match[] = { | |||
325 | { .compatible = "ingenic,jz4780-uart", .data = &jz4780_uart_config }, | 333 | { .compatible = "ingenic,jz4780-uart", .data = &jz4780_uart_config }, |
326 | { /* sentinel */ } | 334 | { /* sentinel */ } |
327 | }; | 335 | }; |
336 | MODULE_DEVICE_TABLE(of, of_match); | ||
328 | 337 | ||
329 | static struct platform_driver ingenic_uart_platform_driver = { | 338 | static struct platform_driver ingenic_uart_platform_driver = { |
330 | .driver = { | 339 | .driver = { |
331 | .name = "ingenic-uart", | 340 | .name = "ingenic-uart", |
332 | .of_match_table = of_match, | 341 | .of_match_table = of_match, |
333 | .suppress_bind_attrs = true, | ||
334 | }, | 342 | }, |
335 | .probe = ingenic_uart_probe, | 343 | .probe = ingenic_uart_probe, |
344 | .remove = ingenic_uart_remove, | ||
336 | }; | 345 | }; |
337 | builtin_platform_driver(ingenic_uart_platform_driver); | 346 | |
347 | module_platform_driver(ingenic_uart_platform_driver); | ||
348 | |||
349 | MODULE_AUTHOR("Paul Burton"); | ||
350 | MODULE_LICENSE("GPL"); | ||
351 | MODULE_DESCRIPTION("Ingenic SoC UART driver"); | ||