From patchwork Mon May 22 20:56:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 765586 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wWrZs4J2wz9s65 for ; Tue, 23 May 2017 06:57:41 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762457AbdEVU5W (ORCPT ); Mon, 22 May 2017 16:57:22 -0400 Received: from mail.windriver.com ([147.11.1.11]:59266 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762433AbdEVU5T (ORCPT ); Mon, 22 May 2017 16:57:19 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id v4MKvFRU024607 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 22 May 2017 13:57:15 -0700 (PDT) Received: from yow-lpgnfs-02.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.294.0; Mon, 22 May 2017 13:57:14 -0700 From: Paul Gortmaker To: CC: Paul Gortmaker , Linus Walleij , Stephen Warren , Thierry Reding , Alexandre Courbot , Pritesh Raithatha , Ashwini Ghuge , , Subject: [PATCH 2/3] pinctrl: tegra: clean up modular vs. non-modular distinctions Date: Mon, 22 May 2017 16:56:47 -0400 Message-ID: <20170522205648.23545-3-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170522205648.23545-1-paul.gortmaker@windriver.com> References: <20170522205648.23545-1-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org None of the Kconfigs for any of these drivers are tristate, meaning that they currently are not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the drivers there is no doubt they are builtin-only. All drivers get similar changes, so they are handled in batch. We remove module.h from code that isn't doing anything modular at all; if they have __init sections, then replace it with init.h. A couple drivers have module_exit() code that is essentially orphaned, and so we remove that. Quite a few bool drivers (hence non-modular) are converted over to to builtin_platform_driver(). 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 was (or is now) contained at the top of the file in the comments. Cc: Linus Walleij Cc: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Cc: Pritesh Raithatha Cc: Ashwini Ghuge Cc: linux-gpio@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/pinctrl/tegra/pinctrl-tegra.c | 1 - drivers/pinctrl/tegra/pinctrl-tegra114.c | 11 ++++------- drivers/pinctrl/tegra/pinctrl-tegra124.c | 11 ++++------- drivers/pinctrl/tegra/pinctrl-tegra20.c | 11 ++++------- drivers/pinctrl/tegra/pinctrl-tegra210.c | 9 ++------- drivers/pinctrl/tegra/pinctrl-tegra30.c | 11 ++++------- 6 files changed, 18 insertions(+), 36 deletions(-) diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c index 277622b4b6fb..51716819129d 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/pinctrl/tegra/pinctrl-tegra114.c b/drivers/pinctrl/tegra/pinctrl-tegra114.c index 952132ce5ea0..56b33fca1bfc 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra114.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra114.c @@ -1,6 +1,8 @@ /* * Pinctrl data for the NVIDIA Tegra114 pinmux * + * Author: Pritesh Raithatha + * * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it @@ -13,7 +15,7 @@ * more details. */ -#include +#include #include #include #include @@ -1857,7 +1859,6 @@ static const struct of_device_id tegra114_pinctrl_of_match[] = { { .compatible = "nvidia,tegra114-pinmux", }, { }, }; -MODULE_DEVICE_TABLE(of, tegra114_pinctrl_of_match); static struct platform_driver tegra114_pinctrl_driver = { .driver = { @@ -1866,8 +1867,4 @@ static struct platform_driver tegra114_pinctrl_driver = { }, .probe = tegra114_pinctrl_probe, }; -module_platform_driver(tegra114_pinctrl_driver); - -MODULE_AUTHOR("Pritesh Raithatha "); -MODULE_DESCRIPTION("NVIDIA Tegra114 pinctrl driver"); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(tegra114_pinctrl_driver); diff --git a/drivers/pinctrl/tegra/pinctrl-tegra124.c b/drivers/pinctrl/tegra/pinctrl-tegra124.c index bca239e3ae50..7bc998ace0d5 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra124.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra124.c @@ -1,6 +1,8 @@ /* * Pinctrl data for the NVIDIA Tegra124 pinmux * + * Author: Ashwini Ghuge + * * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it @@ -13,7 +15,7 @@ * more details. */ -#include +#include #include #include #include @@ -2069,7 +2071,6 @@ static const struct of_device_id tegra124_pinctrl_of_match[] = { { .compatible = "nvidia,tegra124-pinmux", }, { }, }; -MODULE_DEVICE_TABLE(of, tegra124_pinctrl_of_match); static struct platform_driver tegra124_pinctrl_driver = { .driver = { @@ -2078,8 +2079,4 @@ static struct platform_driver tegra124_pinctrl_driver = { }, .probe = tegra124_pinctrl_probe, }; -module_platform_driver(tegra124_pinctrl_driver); - -MODULE_AUTHOR("Ashwini Ghuge "); -MODULE_DESCRIPTION("NVIDIA Tegra124 pinctrl driver"); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(tegra124_pinctrl_driver); diff --git a/drivers/pinctrl/tegra/pinctrl-tegra20.c b/drivers/pinctrl/tegra/pinctrl-tegra20.c index ad62451a5a9b..7e38ee9bae78 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra20.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra20.c @@ -1,6 +1,8 @@ /* * Pinctrl data for the NVIDIA Tegra20 pinmux * + * Author: Stephen Warren + * * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved. * * Derived from code: @@ -17,7 +19,7 @@ * more details. */ -#include +#include #include #include #include @@ -2246,9 +2248,4 @@ static struct platform_driver tegra20_pinctrl_driver = { }, .probe = tegra20_pinctrl_probe, }; -module_platform_driver(tegra20_pinctrl_driver); - -MODULE_AUTHOR("Stephen Warren "); -MODULE_DESCRIPTION("NVIDIA Tegra20 pinctrl driver"); -MODULE_LICENSE("GPL v2"); -MODULE_DEVICE_TABLE(of, tegra20_pinctrl_of_match); +builtin_platform_driver(tegra20_pinctrl_driver); diff --git a/drivers/pinctrl/tegra/pinctrl-tegra210.c b/drivers/pinctrl/tegra/pinctrl-tegra210.c index 2b70e93da9db..c244e5b17bd6 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra210.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra210.c @@ -13,7 +13,7 @@ * more details. */ -#include +#include #include #include #include @@ -1573,7 +1573,6 @@ static const struct of_device_id tegra210_pinctrl_of_match[] = { { .compatible = "nvidia,tegra210-pinmux", }, { }, }; -MODULE_DEVICE_TABLE(of, tegra210_pinctrl_of_match); static struct platform_driver tegra210_pinctrl_driver = { .driver = { @@ -1582,8 +1581,4 @@ static struct platform_driver tegra210_pinctrl_driver = { }, .probe = tegra210_pinctrl_probe, }; -module_platform_driver(tegra210_pinctrl_driver); - -MODULE_AUTHOR("NVIDIA"); -MODULE_DESCRIPTION("NVIDIA Tegra210 pinctrl driver"); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(tegra210_pinctrl_driver); diff --git a/drivers/pinctrl/tegra/pinctrl-tegra30.c b/drivers/pinctrl/tegra/pinctrl-tegra30.c index 474ac6daf513..1f180a20f2ab 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra30.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra30.c @@ -1,6 +1,8 @@ /* * Pinctrl data for the NVIDIA Tegra30 pinmux * + * Author: Stephen Warren + * * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it @@ -13,7 +15,7 @@ * more details. */ -#include +#include #include #include #include @@ -2492,7 +2494,6 @@ static const struct of_device_id tegra30_pinctrl_of_match[] = { { .compatible = "nvidia,tegra30-pinmux", }, { }, }; -MODULE_DEVICE_TABLE(of, tegra30_pinctrl_of_match); static struct platform_driver tegra30_pinctrl_driver = { .driver = { @@ -2501,8 +2502,4 @@ static struct platform_driver tegra30_pinctrl_driver = { }, .probe = tegra30_pinctrl_probe, }; -module_platform_driver(tegra30_pinctrl_driver); - -MODULE_AUTHOR("Stephen Warren "); -MODULE_DESCRIPTION("NVIDIA Tegra30 pinctrl driver"); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(tegra30_pinctrl_driver);