diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2015-08-19 17:48:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-04 12:27:56 -0400 |
commit | 128a3d0603862ce41da322c19d0cc264625d5206 (patch) | |
tree | 93529a5e032b36a4895b23c2bb18c4f5934ecce6 | |
parent | 4b07dd3df3e0928d2abaed32074715723d461744 (diff) |
drivers/tty: make serial/mpsc.c driver explicitly non-modular
The Kconfig for this driver is currently:
config SERIAL_MPSC
bool "Marvell MPSC serial port support"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We leave some tags like MODULE_AUTHOR for documentation purposes.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/mpsc.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/drivers/tty/serial/mpsc.c b/drivers/tty/serial/mpsc.c index 82bb6d1fe23b..edb32e3f1e84 100644 --- a/drivers/tty/serial/mpsc.c +++ b/drivers/tty/serial/mpsc.c | |||
@@ -55,8 +55,6 @@ | |||
55 | #define SUPPORT_SYSRQ | 55 | #define SUPPORT_SYSRQ |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #include <linux/module.h> | ||
59 | #include <linux/moduleparam.h> | ||
60 | #include <linux/tty.h> | 58 | #include <linux/tty.h> |
61 | #include <linux/tty_flip.h> | 59 | #include <linux/tty_flip.h> |
62 | #include <linux/ioport.h> | 60 | #include <linux/ioport.h> |
@@ -2108,24 +2106,8 @@ static int mpsc_drv_probe(struct platform_device *dev) | |||
2108 | return rc; | 2106 | return rc; |
2109 | } | 2107 | } |
2110 | 2108 | ||
2111 | static int mpsc_drv_remove(struct platform_device *dev) | ||
2112 | { | ||
2113 | pr_debug("mpsc_drv_exit: Removing MPSC %d\n", dev->id); | ||
2114 | |||
2115 | if (dev->id < MPSC_NUM_CTLRS) { | ||
2116 | uart_remove_one_port(&mpsc_reg, &mpsc_ports[dev->id].port); | ||
2117 | mpsc_release_port((struct uart_port *) | ||
2118 | &mpsc_ports[dev->id].port); | ||
2119 | mpsc_drv_unmap_regs(&mpsc_ports[dev->id]); | ||
2120 | return 0; | ||
2121 | } else { | ||
2122 | return -ENODEV; | ||
2123 | } | ||
2124 | } | ||
2125 | |||
2126 | static struct platform_driver mpsc_driver = { | 2109 | static struct platform_driver mpsc_driver = { |
2127 | .probe = mpsc_drv_probe, | 2110 | .probe = mpsc_drv_probe, |
2128 | .remove = mpsc_drv_remove, | ||
2129 | .driver = { | 2111 | .driver = { |
2130 | .name = MPSC_CTLR_NAME, | 2112 | .name = MPSC_CTLR_NAME, |
2131 | }, | 2113 | }, |
@@ -2156,22 +2138,10 @@ static int __init mpsc_drv_init(void) | |||
2156 | 2138 | ||
2157 | return rc; | 2139 | return rc; |
2158 | } | 2140 | } |
2141 | device_initcall(mpsc_drv_init); | ||
2159 | 2142 | ||
2160 | static void __exit mpsc_drv_exit(void) | 2143 | /* |
2161 | { | ||
2162 | platform_driver_unregister(&mpsc_driver); | ||
2163 | platform_driver_unregister(&mpsc_shared_driver); | ||
2164 | uart_unregister_driver(&mpsc_reg); | ||
2165 | memset(mpsc_ports, 0, sizeof(mpsc_ports)); | ||
2166 | memset(&mpsc_shared_regs, 0, sizeof(mpsc_shared_regs)); | ||
2167 | } | ||
2168 | |||
2169 | module_init(mpsc_drv_init); | ||
2170 | module_exit(mpsc_drv_exit); | ||
2171 | |||
2172 | MODULE_AUTHOR("Mark A. Greer <mgreer@mvista.com>"); | 2144 | MODULE_AUTHOR("Mark A. Greer <mgreer@mvista.com>"); |
2173 | MODULE_DESCRIPTION("Generic Marvell MPSC serial/UART driver"); | 2145 | MODULE_DESCRIPTION("Generic Marvell MPSC serial/UART driver"); |
2174 | MODULE_VERSION(MPSC_VERSION); | ||
2175 | MODULE_LICENSE("GPL"); | 2146 | MODULE_LICENSE("GPL"); |
2176 | MODULE_ALIAS_CHARDEV_MAJOR(MPSC_MAJOR); | 2147 | */ |
2177 | MODULE_ALIAS("platform:" MPSC_CTLR_NAME); | ||