Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992941AbbHIAyG (ORCPT ); Sat, 8 Aug 2015 20:54:06 -0400 Received: from mail.windriver.com ([147.11.1.11]:51452 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992898AbbHIAxv (ORCPT ); Sat, 8 Aug 2015 20:53:51 -0400 From: Paul Gortmaker To: CC: Paul Gortmaker , Greg Kroah-Hartman , Jiri Slaby , Subject: [PATCH 4/5] drivers/tty: make serial/mpsc.c driver explicitly non-modular Date: Sat, 8 Aug 2015 20:51:36 -0400 Message-ID: <1439081497-14986-5-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1439081497-14986-1-git-send-email-paul.gortmaker@windriver.com> References: <1439081497-14986-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2784 Lines: 94 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 Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/tty/serial/mpsc.c | 36 +++--------------------------------- 1 file 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 @@ #define SUPPORT_SYSRQ #endif -#include -#include #include #include #include @@ -2108,24 +2106,8 @@ static int mpsc_drv_probe(struct platform_device *dev) return rc; } -static int mpsc_drv_remove(struct platform_device *dev) -{ - pr_debug("mpsc_drv_exit: Removing MPSC %d\n", dev->id); - - if (dev->id < MPSC_NUM_CTLRS) { - uart_remove_one_port(&mpsc_reg, &mpsc_ports[dev->id].port); - mpsc_release_port((struct uart_port *) - &mpsc_ports[dev->id].port); - mpsc_drv_unmap_regs(&mpsc_ports[dev->id]); - return 0; - } else { - return -ENODEV; - } -} - static struct platform_driver mpsc_driver = { .probe = mpsc_drv_probe, - .remove = mpsc_drv_remove, .driver = { .name = MPSC_CTLR_NAME, }, @@ -2156,22 +2138,10 @@ static int __init mpsc_drv_init(void) return rc; } +device_initcall(mpsc_drv_init); -static void __exit mpsc_drv_exit(void) -{ - platform_driver_unregister(&mpsc_driver); - platform_driver_unregister(&mpsc_shared_driver); - uart_unregister_driver(&mpsc_reg); - memset(mpsc_ports, 0, sizeof(mpsc_ports)); - memset(&mpsc_shared_regs, 0, sizeof(mpsc_shared_regs)); -} - -module_init(mpsc_drv_init); -module_exit(mpsc_drv_exit); - +/* MODULE_AUTHOR("Mark A. Greer "); MODULE_DESCRIPTION("Generic Marvell MPSC serial/UART driver"); -MODULE_VERSION(MPSC_VERSION); MODULE_LICENSE("GPL"); -MODULE_ALIAS_CHARDEV_MAJOR(MPSC_MAJOR); -MODULE_ALIAS("platform:" MPSC_CTLR_NAME); +*/ -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/