From patchwork Wed Dec 18 20:48:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 11301939 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CCB76C1 for ; Wed, 18 Dec 2019 20:49:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 84CBF2176D for ; Wed, 18 Dec 2019 20:49:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727608AbfLRUtj (ORCPT ); Wed, 18 Dec 2019 15:49:39 -0500 Received: from mail.windriver.com ([147.11.1.11]:47841 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727553AbfLRUtd (ORCPT ); Wed, 18 Dec 2019 15:49:33 -0500 Received: from yow-cube1.wrs.com (yow-cube1.wrs.com [128.224.56.98]) by mail.windriver.com (8.15.2/8.15.2) with ESMTP id xBIKn0ia000214; Wed, 18 Dec 2019 12:49:11 -0800 (PST) From: Paul Gortmaker To: Lee Jones Cc: linux-kernel@vger.kernel.org, Paul Gortmaker , Tony Lindgren , Peter Ujfalusi , linux-omap@vger.kernel.org Subject: [PATCH 08/18] mfd: twl4030-audio: Make it explicitly non-modular Date: Wed, 18 Dec 2019 15:48:47 -0500 Message-Id: <1576702137-25905-9-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> References: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_TWL4030_AUDIO drivers/mfd/Kconfig: bool "TI TWL4030 Audio" ...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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Lee Jones Cc: Peter Ujfalusi Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker Acked-by: Peter Ujfalusi --- drivers/mfd/twl4030-audio.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/mfd/twl4030-audio.c b/drivers/mfd/twl4030-audio.c index 4536d829b43e..7612997e3b86 100644 --- a/drivers/mfd/twl4030-audio.c +++ b/drivers/mfd/twl4030-audio.c @@ -8,7 +8,7 @@ * Copyright: (C) 2009 Nokia Corporation */ -#include +#include #include #include #include @@ -258,32 +258,17 @@ static int twl4030_audio_probe(struct platform_device *pdev) return ret; } -static int twl4030_audio_remove(struct platform_device *pdev) -{ - mfd_remove_devices(&pdev->dev); - twl4030_audio_dev = NULL; - - return 0; -} - static const struct of_device_id twl4030_audio_of_match[] = { {.compatible = "ti,twl4030-audio", }, { }, }; -MODULE_DEVICE_TABLE(of, twl4030_audio_of_match); static struct platform_driver twl4030_audio_driver = { .driver = { .name = "twl4030-audio", .of_match_table = twl4030_audio_of_match, + .suppress_bind_attrs = true, }, .probe = twl4030_audio_probe, - .remove = twl4030_audio_remove, }; - -module_platform_driver(twl4030_audio_driver); - -MODULE_AUTHOR("Peter Ujfalusi "); -MODULE_DESCRIPTION("TWL4030 audio block MFD driver"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:twl4030-audio"); +builtin_platform_driver(twl4030_audio_driver); From patchwork Wed Dec 18 20:48:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 11301931 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA60D6C1 for ; Wed, 18 Dec 2019 20:49:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A29B121D7D for ; Wed, 18 Dec 2019 20:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727422AbfLRUtR (ORCPT ); Wed, 18 Dec 2019 15:49:17 -0500 Received: from mail.windriver.com ([147.11.1.11]:47822 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727282AbfLRUtR (ORCPT ); Wed, 18 Dec 2019 15:49:17 -0500 Received: from yow-cube1.wrs.com (yow-cube1.wrs.com [128.224.56.98]) by mail.windriver.com (8.15.2/8.15.2) with ESMTP id xBIKn0ib000214; Wed, 18 Dec 2019 12:49:12 -0800 (PST) From: Paul Gortmaker To: Lee Jones Cc: linux-kernel@vger.kernel.org, Paul Gortmaker , Tony Lindgren , linux-omap@vger.kernel.org Subject: [PATCH 09/18] mfd: twl4030-power: Make it explicitly non-modular Date: Wed, 18 Dec 2019 15:48:48 -0500 Message-Id: <1576702137-25905-10-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> References: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config TWL4030_POWER drivers/mfd/Kconfig: bool "TI TWL4030 power resources" ...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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. The remove function here was clearly a no-op anyway, so no unbind functionality could possibly be impacted. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Lee Jones Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/mfd/twl4030-power.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c index 6b36932263ba..5655218b2552 100644 --- a/drivers/mfd/twl4030-power.c +++ b/drivers/mfd/twl4030-power.c @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include #include #include #include @@ -876,7 +876,6 @@ static const struct of_device_id twl4030_power_of_match[] = { }, { }, }; -MODULE_DEVICE_TABLE(of, twl4030_power_of_match); #endif /* CONFIG_OF */ static int twl4030_power_probe(struct platform_device *pdev) @@ -953,24 +952,12 @@ static int twl4030_power_probe(struct platform_device *pdev) return err; } -static int twl4030_power_remove(struct platform_device *pdev) -{ - return 0; -} - static struct platform_driver twl4030_power_driver = { .driver = { .name = "twl4030_power", .of_match_table = of_match_ptr(twl4030_power_of_match), + .suppress_bind_attrs = true, }, .probe = twl4030_power_probe, - .remove = twl4030_power_remove, }; - -module_platform_driver(twl4030_power_driver); - -MODULE_AUTHOR("Nokia Corporation"); -MODULE_AUTHOR("Texas Instruments, Inc."); -MODULE_DESCRIPTION("Power management for TWL4030"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:twl4030_power"); +builtin_platform_driver(twl4030_power_driver); From patchwork Wed Dec 18 20:48:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 11301943 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6554A6C1 for ; Wed, 18 Dec 2019 20:50:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D0042176D for ; Wed, 18 Dec 2019 20:50:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727276AbfLRUt4 (ORCPT ); Wed, 18 Dec 2019 15:49:56 -0500 Received: from mail.windriver.com ([147.11.1.11]:47848 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727395AbfLRUtV (ORCPT ); Wed, 18 Dec 2019 15:49:21 -0500 Received: from yow-cube1.wrs.com (yow-cube1.wrs.com [128.224.56.98]) by mail.windriver.com (8.15.2/8.15.2) with ESMTP id xBIKn0ic000214; Wed, 18 Dec 2019 12:49:13 -0800 (PST) From: Paul Gortmaker To: Lee Jones Cc: linux-kernel@vger.kernel.org, Paul Gortmaker , Tony Lindgren , Misael Lopez Cruz , Jorge Eduardo Candelaria , linux-omap@vger.kernel.org Subject: [PATCH 10/18] mfd: twl6040: Make it explicitly non-modular Date: Wed, 18 Dec 2019 15:48:49 -0500 Message-Id: <1576702137-25905-11-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> References: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The Kconfig/Makefile controlling compilation of this code is: drivers/mfd/Kconfig:config TWL6040_CORE drivers/mfd/Kconfig: bool "TI TWL6040 audio codec" drivers/mfd/Makefile: obj-$(CONFIG_TWL6040_CORE) += twl6040.o ...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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_i2c_driver() uses the same init level priority as builtin_i2c_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Lee Jones Cc: Misael Lopez Cruz Cc: Jorge Eduardo Candelaria Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/mfd/twl6040.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index b9c6d94b4002..531eefb2fab5 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c @@ -9,7 +9,7 @@ * Copyright: (C) 2011 Texas Instruments, Inc. */ -#include +#include #include #include #include @@ -808,41 +808,18 @@ static int twl6040_probe(struct i2c_client *client, return ret; } -static int twl6040_remove(struct i2c_client *client) -{ - struct twl6040 *twl6040 = i2c_get_clientdata(client); - - if (twl6040->power_count) - twl6040_power(twl6040, 0); - - regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); - - mfd_remove_devices(&client->dev); - - regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); - - return 0; -} - static const struct i2c_device_id twl6040_i2c_id[] = { { "twl6040", 0, }, { "twl6041", 0, }, { }, }; -MODULE_DEVICE_TABLE(i2c, twl6040_i2c_id); static struct i2c_driver twl6040_driver = { .driver = { .name = "twl6040", + .suppress_bind_attrs = true, }, .probe = twl6040_probe, - .remove = twl6040_remove, .id_table = twl6040_i2c_id, }; - -module_i2c_driver(twl6040_driver); - -MODULE_DESCRIPTION("TWL6040 MFD"); -MODULE_AUTHOR("Misael Lopez Cruz "); -MODULE_AUTHOR("Jorge Eduardo Candelaria "); -MODULE_LICENSE("GPL"); +builtin_i2c_driver(twl6040_driver); From patchwork Wed Dec 18 20:48:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 11301945 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0AD5C1580 for ; Wed, 18 Dec 2019 20:50:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DBFFB2176D for ; Wed, 18 Dec 2019 20:50:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727615AbfLRUtV (ORCPT ); Wed, 18 Dec 2019 15:49:21 -0500 Received: from mail.windriver.com ([147.11.1.11]:47846 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727608AbfLRUtU (ORCPT ); Wed, 18 Dec 2019 15:49:20 -0500 Received: from yow-cube1.wrs.com (yow-cube1.wrs.com [128.224.56.98]) by mail.windriver.com (8.15.2/8.15.2) with ESMTP id xBIKn0if000214; Wed, 18 Dec 2019 12:49:15 -0800 (PST) From: Paul Gortmaker To: Lee Jones Cc: linux-kernel@vger.kernel.org, Paul Gortmaker , Tony Lindgren , linux-omap@vger.kernel.org Subject: [PATCH 13/18] mfd: menelaus: Make it explicitly non-modular Date: Wed, 18 Dec 2019 15:48:52 -0500 Message-Id: <1576702137-25905-14-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> References: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MENELAUS drivers/mfd/Kconfig: bool "TI TWL92330/Menelaus PM chip" ...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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_i2c_driver() uses the same init level priority as builtin_i2c_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Lee Jones Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/mfd/menelaus.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index b64d3315a5e1..65a268d11aaa 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c @@ -18,7 +18,7 @@ * Copyright (C) 2005, 2006 Nokia Corporation */ -#include +#include #include #include #include @@ -1222,33 +1222,17 @@ static int menelaus_probe(struct i2c_client *client, return err; } -static int menelaus_remove(struct i2c_client *client) -{ - struct menelaus_chip *menelaus = i2c_get_clientdata(client); - - free_irq(client->irq, menelaus); - flush_work(&menelaus->work); - the_menelaus = NULL; - return 0; -} - static const struct i2c_device_id menelaus_id[] = { { "menelaus", 0 }, { } }; -MODULE_DEVICE_TABLE(i2c, menelaus_id); static struct i2c_driver menelaus_i2c_driver = { .driver = { - .name = DRIVER_NAME, + .name = DRIVER_NAME, + .suppress_bind_attrs = true, }, .probe = menelaus_probe, - .remove = menelaus_remove, .id_table = menelaus_id, }; - -module_i2c_driver(menelaus_i2c_driver); - -MODULE_AUTHOR("Texas Instruments, Inc. (and others)"); -MODULE_DESCRIPTION("I2C interface for Menelaus."); -MODULE_LICENSE("GPL"); +builtin_i2c_driver(menelaus_i2c_driver); From patchwork Wed Dec 18 20:48:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 11301935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 35CC86C1 for ; Wed, 18 Dec 2019 20:49:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DD9B21D7D for ; Wed, 18 Dec 2019 20:49:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726463AbfLRUt3 (ORCPT ); Wed, 18 Dec 2019 15:49:29 -0500 Received: from mail.windriver.com ([147.11.1.11]:47864 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727664AbfLRUt2 (ORCPT ); Wed, 18 Dec 2019 15:49:28 -0500 Received: from yow-cube1.wrs.com (yow-cube1.wrs.com [128.224.56.98]) by mail.windriver.com (8.15.2/8.15.2) with ESMTP id xBIKn0ih000214; Wed, 18 Dec 2019 12:49:16 -0800 (PST) From: Paul Gortmaker To: Lee Jones Cc: linux-kernel@vger.kernel.org, Paul Gortmaker , Tony Lindgren , Keshava Munegowda , Roger Quadros , linux-omap@vger.kernel.org Subject: [PATCH 15/18] mfd: omap-usb-tll: Make it explicitly non-modular Date: Wed, 18 Dec 2019 15:48:54 -0500 Message-Id: <1576702137-25905-16-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> References: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_OMAP_USB_HOST drivers/mfd/Kconfig: bool "TI OMAP USBHS core and TLL driver" ...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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Lee Jones Cc: Keshava Munegowda Cc: Roger Quadros Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/mfd/omap-usb-tll.c | 47 ++++------------------------------------------ 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 265f5e350e1c..77c8d98a6731 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c @@ -7,7 +7,7 @@ * Author: Roger Quadros */ #include -#include +#include #include #include #include @@ -269,46 +269,18 @@ static int usbtll_omap_probe(struct platform_device *pdev) return 0; } -/** - * usbtll_omap_remove - shutdown processing for UHH & TLL HCDs - * @pdev: USB Host Controller being removed - * - * Reverses the effect of usbtll_omap_probe(). - */ -static int usbtll_omap_remove(struct platform_device *pdev) -{ - struct usbtll_omap *tll = platform_get_drvdata(pdev); - int i; - - spin_lock(&tll_lock); - tll_dev = NULL; - spin_unlock(&tll_lock); - - for (i = 0; i < tll->nch; i++) { - if (!IS_ERR(tll->ch_clk[i])) { - clk_unprepare(tll->ch_clk[i]); - clk_put(tll->ch_clk[i]); - } - } - - pm_runtime_disable(&pdev->dev); - return 0; -} - static const struct of_device_id usbtll_omap_dt_ids[] = { { .compatible = "ti,usbhs-tll" }, { } }; -MODULE_DEVICE_TABLE(of, usbtll_omap_dt_ids); - static struct platform_driver usbtll_omap_driver = { .driver = { - .name = (char *)usbtll_driver_name, - .of_match_table = usbtll_omap_dt_ids, + .name = (char *)usbtll_driver_name, + .of_match_table = usbtll_omap_dt_ids, + .suppress_bind_attrs = true, }, .probe = usbtll_omap_probe, - .remove = usbtll_omap_remove, }; int omap_tll_init(struct usbhs_omap_platform_data *pdata) @@ -446,11 +418,6 @@ int omap_tll_disable(struct usbhs_omap_platform_data *pdata) } EXPORT_SYMBOL_GPL(omap_tll_disable); -MODULE_AUTHOR("Keshava Munegowda "); -MODULE_AUTHOR("Roger Quadros "); -MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("usb tll driver for TI OMAP EHCI and OHCI controllers"); - static int __init omap_usbtll_drvinit(void) { return platform_driver_register(&usbtll_omap_driver); @@ -462,9 +429,3 @@ static int __init omap_usbtll_drvinit(void) * the usbhs core driver probe function is called. */ fs_initcall(omap_usbtll_drvinit); - -static void __exit omap_usbtll_drvexit(void) -{ - platform_driver_unregister(&usbtll_omap_driver); -} -module_exit(omap_usbtll_drvexit); From patchwork Wed Dec 18 20:48:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 11301933 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68DC514F6 for ; Wed, 18 Dec 2019 20:49:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4FF562176D for ; Wed, 18 Dec 2019 20:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727671AbfLRUtY (ORCPT ); Wed, 18 Dec 2019 15:49:24 -0500 Received: from mail.windriver.com ([147.11.1.11]:47858 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727608AbfLRUtX (ORCPT ); Wed, 18 Dec 2019 15:49:23 -0500 Received: from yow-cube1.wrs.com (yow-cube1.wrs.com [128.224.56.98]) by mail.windriver.com (8.15.2/8.15.2) with ESMTP id xBIKn0ii000214; Wed, 18 Dec 2019 12:49:17 -0800 (PST) From: Paul Gortmaker To: Lee Jones Cc: linux-kernel@vger.kernel.org, Paul Gortmaker , Tony Lindgren , Keshava Munegowda , Roger Quadros , linux-omap@vger.kernel.org Subject: [PATCH 16/18] mfd: omap-usb-host: Make it explicitly non-modular Date: Wed, 18 Dec 2019 15:48:55 -0500 Message-Id: <1576702137-25905-17-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> References: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_OMAP_USB_HOST drivers/mfd/Kconfig: bool "TI OMAP USBHS core and TLL driver" ...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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Lee Jones Cc: Keshava Munegowda Cc: Roger Quadros Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/mfd/omap-usb-host.c | 47 +++++---------------------------------------- 1 file changed, 5 insertions(+), 42 deletions(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 4798d9f3f9d5..118756d7be19 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -7,7 +7,7 @@ * Author: Roger Quadros */ #include -#include +#include #include #include #include @@ -803,28 +803,6 @@ static int usbhs_omap_probe(struct platform_device *pdev) return ret; } -static int usbhs_omap_remove_child(struct device *dev, void *data) -{ - dev_info(dev, "unregistering\n"); - platform_device_unregister(to_platform_device(dev)); - return 0; -} - -/** - * usbhs_omap_remove - shutdown processing for UHH & TLL HCDs - * @pdev: USB Host Controller being removed - * - * Reverses the effect of usbhs_omap_probe(). - */ -static int usbhs_omap_remove(struct platform_device *pdev) -{ - pm_runtime_disable(&pdev->dev); - - /* remove children */ - device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child); - return 0; -} - static const struct dev_pm_ops usbhsomap_dev_pm_ops = { .runtime_suspend = usbhs_runtime_suspend, .runtime_resume = usbhs_runtime_resume, @@ -835,25 +813,16 @@ static const struct of_device_id usbhs_omap_dt_ids[] = { { } }; -MODULE_DEVICE_TABLE(of, usbhs_omap_dt_ids); - - static struct platform_driver usbhs_omap_driver = { .driver = { - .name = (char *)usbhs_driver_name, - .pm = &usbhsomap_dev_pm_ops, - .of_match_table = usbhs_omap_dt_ids, + .name = (char *)usbhs_driver_name, + .pm = &usbhsomap_dev_pm_ops, + .of_match_table = usbhs_omap_dt_ids, + .suppress_bind_attr = true, }, .probe = usbhs_omap_probe, - .remove = usbhs_omap_remove, }; -MODULE_AUTHOR("Keshava Munegowda "); -MODULE_AUTHOR("Roger Quadros "); -MODULE_ALIAS("platform:" USBHS_DRIVER_NAME); -MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("usb host common core driver for omap EHCI and OHCI"); - static int omap_usbhs_drvinit(void) { return platform_driver_register(&usbhs_omap_driver); @@ -867,9 +836,3 @@ static int omap_usbhs_drvinit(void) * usb tll driver */ fs_initcall_sync(omap_usbhs_drvinit); - -static void omap_usbhs_drvexit(void) -{ - platform_driver_unregister(&usbhs_omap_driver); -} -module_exit(omap_usbhs_drvexit); From patchwork Wed Dec 18 20:48:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 11301937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0FC56C1 for ; Wed, 18 Dec 2019 20:49:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A876020716 for ; Wed, 18 Dec 2019 20:49:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727722AbfLRUtc (ORCPT ); Wed, 18 Dec 2019 15:49:32 -0500 Received: from mail.windriver.com ([147.11.1.11]:47879 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727608AbfLRUta (ORCPT ); Wed, 18 Dec 2019 15:49:30 -0500 Received: from yow-cube1.wrs.com (yow-cube1.wrs.com [128.224.56.98]) by mail.windriver.com (8.15.2/8.15.2) with ESMTP id xBIKn0ij000214; Wed, 18 Dec 2019 12:49:18 -0800 (PST) From: Paul Gortmaker To: Lee Jones Cc: linux-kernel@vger.kernel.org, Paul Gortmaker , Tony Lindgren , Graeme Gregory , linux-omap@vger.kernel.org Subject: [PATCH 17/18] mfd: palmas: Make it explicitly non-modular Date: Wed, 18 Dec 2019 15:48:56 -0500 Message-Id: <1576702137-25905-18-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> References: <1576702137-25905-1-git-send-email-paul.gortmaker@windriver.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_PALMAS drivers/mfd/Kconfig: bool "TI Palmas series chips" ...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. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. We delete the include of module.h as well as an unused instance of moduleparam.h include as well. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Tony Lindgren Cc: Lee Jones Cc: Graeme Gregory Cc: linux-omap@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/mfd/palmas.c | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index f5b3fa973b13..0e96c5cd02c6 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c @@ -7,8 +7,6 @@ * Author: Graeme Gregory */ -#include -#include #include #include #include @@ -500,7 +498,6 @@ static const struct of_device_id of_palmas_match_tbl[] = { }, { }, }; -MODULE_DEVICE_TABLE(of, of_palmas_match_tbl); static int palmas_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) @@ -700,26 +697,6 @@ static int palmas_i2c_probe(struct i2c_client *i2c, return ret; } -static int palmas_i2c_remove(struct i2c_client *i2c) -{ - struct palmas *palmas = i2c_get_clientdata(i2c); - int i; - - regmap_del_irq_chip(palmas->irq, palmas->irq_data); - - for (i = 1; i < PALMAS_NUM_CLIENTS; i++) { - if (palmas->i2c_clients[i]) - i2c_unregister_device(palmas->i2c_clients[i]); - } - - if (palmas == palmas_dev) { - pm_power_off = NULL; - palmas_dev = NULL; - } - - return 0; -} - static const struct i2c_device_id palmas_i2c_id[] = { { "palmas", }, { "twl6035", }, @@ -727,15 +704,14 @@ static const struct i2c_device_id palmas_i2c_id[] = { { "tps65913", }, { /* end */ } }; -MODULE_DEVICE_TABLE(i2c, palmas_i2c_id); static struct i2c_driver palmas_i2c_driver = { .driver = { .name = "palmas", .of_match_table = of_palmas_match_tbl, + .suppress_bind_attrs = true, }, .probe = palmas_i2c_probe, - .remove = palmas_i2c_remove, .id_table = palmas_i2c_id, }; @@ -745,13 +721,3 @@ static int __init palmas_i2c_init(void) } /* init early so consumer devices can complete system boot */ subsys_initcall(palmas_i2c_init); - -static void __exit palmas_i2c_exit(void) -{ - i2c_del_driver(&palmas_i2c_driver); -} -module_exit(palmas_i2c_exit); - -MODULE_AUTHOR("Graeme Gregory "); -MODULE_DESCRIPTION("Palmas chip family multi-function driver"); -MODULE_LICENSE("GPL");