From patchwork Wed Feb 17 15:02:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102759 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp50171lbl; Wed, 17 Feb 2016 07:04:21 -0800 (PST) X-Received: by 10.98.70.139 with SMTP id o11mr2723928pfi.123.1455721461188; Wed, 17 Feb 2016 07:04:21 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ut6si2352986pac.241.2016.02.17.07.04.20; Wed, 17 Feb 2016 07:04:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965326AbcBQPET (ORCPT + 1 other); Wed, 17 Feb 2016 10:04:19 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:50271 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965236AbcBQPES (ORCPT ); Wed, 17 Feb 2016 10:04:18 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0M36xf-1Zeux62F6d-00swyd; Wed, 17 Feb 2016 16:03:35 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Paul Gortmaker , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Peter Hurley , Jiri Slaby , Matt Redfearn , Phillip Raffeck , Anton Wuerfel Subject: [PATCH v3 2/5] Revert "drivers/tty/serial: make 8250/8250_ingenic.c explicitly non-modular" Date: Wed, 17 Feb 2016 16:02:32 +0100 Message-Id: <1455721357-4008289-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455721357-4008289-1-git-send-email-arnd@arndb.de> References: <1455721357-4008289-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:UokaPyBkzosepw/V3hjwB9C6DR/uO8R6VZTWcF9t6cWru5z+1J1 FPXg67cjFFmLe7PMy/jR9ealCZe049NYlahRTAo49XCUghxsbSdP6Fb0prqC7C6coVYKlqf L1gDVdB0yX7iMsxKWtB0z4dAMhYSX7/jD3tM12CQEG2PKHp2JQ5sRH0Hoo8DYyydIZLZEvH AOvm583uqNeYCElncYBXw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Puox8Q5XQgc=:MbDy//xZFOCvYL5BrRFsdM xV5Kqh3pwHCFh5A3xk48yceKu5PtGQmXetGDnlTtpdV4tcZTgvNhkCR3R8b4yBwxZbU9D/RNZ blq12HklNWbrdQDkkhaOHqQ8fBUIksR3P4iT+0UnZOrIDNGzU+GGOV2KNmNqtYmYDyXGLrp3z 5OhKCIRBwzRsv+G6owkwgLyDvX7fBLXz72MchLFmfZx8sZ5mFfXVET3uKPX9TwnmwXvw4aBoI FpPT258hGEAOdwR+nHbLYDZJWQ3S75qtN2RtfCJr3vLZZj6u18nfAVwKjHtR2zQ/KbpeF/fgt Mk+/Y5BmQqr+Ypy9tsxxS+10hOHxR8+Xa4/xwM+7EoHKV39nWTwKdsdkK68SPrCupesv9p9k5 6yRtuQcpsIh8lXb6m82EpQw9EJuy7REn/H9y8+8jY2/RLFTacUAWBXT5BPVHlJZrd/eGPLcgn MWab93hxTsMnbekeot0TPoVHsMjdz8WFW+4X6ZfZSSHYZ2Dto+Ok4qe93uEvQNozS5eTOzS8n U1FWnY1R3bOJBYhwHEZX1HdpODgJm4e9V4H0u/Yy7fHs3qNerQTZjXeBnlDKkFE/Mm3mEv2ls SRBa8cnN+bCjYF8ptA09EYGhnu2BC/gsl3Z9h2vGqUEJAchar7F4sLQ1QBP/X86RygCvEEXhJ Jj7fgvCfUjH6qVxhFqoXEJc5dguGECTzb563lMuiiNlI5EX20nA4tAuLtK8uatpUPEx4= Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 --- drivers/tty/serial/8250/8250_ingenic.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 @@ * * Ingenic SoC UART support * - * Author: Paul Burton - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your @@ -20,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -303,6 +301,16 @@ out: return err; } +static int ingenic_uart_remove(struct platform_device *pdev) +{ + struct ingenic_uart_data *data = platform_get_drvdata(pdev); + + serial8250_unregister_port(data->line); + clk_disable_unprepare(data->clk_module); + clk_disable_unprepare(data->clk_baud); + return 0; +} + static const struct ingenic_uart_config jz4740_uart_config = { .tx_loadsz = 8, .fifosize = 16, @@ -325,13 +333,19 @@ static const struct of_device_id of_match[] = { { .compatible = "ingenic,jz4780-uart", .data = &jz4780_uart_config }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, of_match); static struct platform_driver ingenic_uart_platform_driver = { .driver = { - .name = "ingenic-uart", - .of_match_table = of_match, - .suppress_bind_attrs = true, + .name = "ingenic-uart", + .of_match_table = of_match, }, .probe = ingenic_uart_probe, + .remove = ingenic_uart_remove, }; -builtin_platform_driver(ingenic_uart_platform_driver); + +module_platform_driver(ingenic_uart_platform_driver); + +MODULE_AUTHOR("Paul Burton"); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Ingenic SoC UART driver");