From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
Alexandre Courbot <gnurou@gmail.com>,
Jon Hunter <jonathanh@nvidia.com>, <linux-tegra@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH 3/4] bus: tegra-aconnect: make it explicitly non-modular
Date: Sun, 3 Jul 2016 13:30:39 -0400 [thread overview]
Message-ID: <20160703173040.23612-4-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <20160703173040.23612-1-paul.gortmaker@windriver.com>
The Kconfig currently controlling compilation of this code is:
drivers/bus/Kconfig:config TEGRA_ACONNECT
drivers/bus/Kconfig: bool "Tegra ACONNECT Bus 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_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: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Jon Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/bus/tegra-aconnect.c | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/drivers/bus/tegra-aconnect.c b/drivers/bus/tegra-aconnect.c
index 7e4104b74fa8..f3982946ab8a 100644
--- a/drivers/bus/tegra-aconnect.c
+++ b/drivers/bus/tegra-aconnect.c
@@ -1,6 +1,8 @@
/*
* Tegra ACONNECT Bus Driver
*
+ * Author: Jon Hunter <jonathanh@nvidia.com>
+ *
* Copyright (C) 2016, NVIDIA CORPORATION. All rights reserved.
*
* This file is subject to the terms and conditions of the GNU General Public
@@ -9,7 +11,7 @@
*/
#include <linux/clk.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_clock.h>
@@ -66,15 +68,6 @@ clk_destroy:
return ret;
}
-static int tegra_aconnect_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
-
- pm_clk_destroy(&pdev->dev);
-
- return 0;
-}
-
static int tegra_aconnect_runtime_resume(struct device *dev)
{
return pm_clk_resume(dev);
@@ -94,19 +87,14 @@ static const struct of_device_id tegra_aconnect_of_match[] = {
{ .compatible = "nvidia,tegra210-aconnect", },
{ }
};
-MODULE_DEVICE_TABLE(of, tegra_aconnect_of_match);
static struct platform_driver tegra_aconnect_driver = {
.probe = tegra_aconnect_probe,
- .remove = tegra_aconnect_remove,
.driver = {
.name = "tegra-aconnect",
+ .suppress_bind_attrs = true,
.of_match_table = tegra_aconnect_of_match,
.pm = &tegra_aconnect_pm_ops,
},
};
-module_platform_driver(tegra_aconnect_driver);
-
-MODULE_DESCRIPTION("NVIDIA Tegra ACONNECT Bus Driver");
-MODULE_AUTHOR("Jon Hunter <jonathanh@nvidia.com>");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(tegra_aconnect_driver);
--
2.8.4
next prev parent reply other threads:[~2016-07-03 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-03 17:30 [PATCH v2 0/4] bus: remove unused modular code from non-modular drivers Paul Gortmaker
2016-07-03 17:30 ` [PATCH 1/4] bus: brcmstb_gisb: make it explicitly non-modular Paul Gortmaker
2016-07-14 22:34 ` Florian Fainelli
2016-07-03 17:30 ` [PATCH 2/4] bus: imx-weim: " Paul Gortmaker
2016-07-03 17:30 ` Paul Gortmaker [this message]
2016-07-04 9:17 ` [PATCH 3/4] bus: tegra-aconnect: " Jon Hunter
2016-07-04 13:41 ` Paul Gortmaker
2016-07-04 13:47 ` Jon Hunter
2016-07-03 17:30 ` [PATCH 4/4] bus: simple-pm-bus: convert bool SIMPLE_PM_BUS to tristate Paul Gortmaker
2016-07-04 14:18 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160703173040.23612-4-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=gnurou@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).