From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Vinod Koul <vinod.koul@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
<dmaengine@vger.kernel.org>
Subject: [PATCH 3/6] drivers/dma: make mmp_tdma.c explicitly non-modular
Date: Wed, 9 Dec 2015 18:21:59 -0500 [thread overview]
Message-ID: <1449703322-17762-4-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1449703322-17762-1-git-send-email-paul.gortmaker@windriver.com>
The Kconfig currently controlling compilation of this code is:
drivers/dma/Kconfig:config MMP_TDMA
drivers/dma/Kconfig: bool "MMP Two-Channel DMA 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.
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: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: dmaengine@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/dma/mmp_tdma.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 3df0422607d5..e231a0e79562 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -1,6 +1,7 @@
/*
* Driver For Marvell Two-channel DMA Engine
*
+ * Authors: Leo Yan <leoy@marvell.com> Zhangfei Gao <zhangfei.gao@marvell.com>
* Copyright: Marvell International Ltd.
*
* The code contained herein is licensed under the GNU General Public
@@ -10,7 +11,6 @@
*/
#include <linux/err.h>
-#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/interrupt.h>
@@ -530,14 +530,6 @@ static void mmp_tdma_issue_pending(struct dma_chan *chan)
mmp_tdma_enable_chan(tdmac);
}
-static int mmp_tdma_remove(struct platform_device *pdev)
-{
- struct mmp_tdma_device *tdev = platform_get_drvdata(pdev);
-
- dma_async_device_unregister(&tdev->device);
- return 0;
-}
-
static int mmp_tdma_chan_init(struct mmp_tdma_device *tdev,
int idx, int irq,
int type, struct gen_pool *pool)
@@ -617,7 +609,6 @@ static const struct of_device_id mmp_tdma_dt_ids[] = {
{ .compatible = "marvell,pxa910-squ", .data = (void *)PXA910_SQU},
{}
};
-MODULE_DEVICE_TABLE(of, mmp_tdma_dt_ids);
static int mmp_tdma_probe(struct platform_device *pdev)
{
@@ -728,17 +719,10 @@ static const struct platform_device_id mmp_tdma_id_table[] = {
static struct platform_driver mmp_tdma_driver = {
.driver = {
.name = "mmp-tdma",
+ .suppress_bind_attrs = true,
.of_match_table = mmp_tdma_dt_ids,
},
.id_table = mmp_tdma_id_table,
.probe = mmp_tdma_probe,
- .remove = mmp_tdma_remove,
};
-
-module_platform_driver(mmp_tdma_driver);
-
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("MMP Two-Channel DMA Driver");
-MODULE_ALIAS("platform:mmp-tdma");
-MODULE_AUTHOR("Leo Yan <leoy@marvell.com>");
-MODULE_AUTHOR("Zhangfei Gao <zhangfei.gao@marvell.com>");
+builtin_platform_driver(mmp_tdma_driver);
--
2.6.1
next prev parent reply other threads:[~2015-12-09 23:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 23:21 [PATCH 0/6] drivers/dma: drop modular code from non modular drivers Paul Gortmaker
2015-12-09 23:21 ` [PATCH 1/6] drivers/dma: make edma.c explicitly non-modular Paul Gortmaker
2015-12-09 23:21 ` [PATCH 2/6] drivers/dma: make mmp_pdma.c " Paul Gortmaker
2015-12-09 23:21 ` Paul Gortmaker [this message]
2015-12-09 23:22 ` [PATCH 4/6] drivers/dma: make pxa_dma.c " Paul Gortmaker
2015-12-09 23:22 ` [PATCH 5/6] drivers/dma: make sh/shdma-*.c " Paul Gortmaker
2015-12-10 9:46 ` Geert Uytterhoeven
2015-12-09 23:22 ` [PATCH 6/6] drivers/dma: make tegra20-apb-dma.c " Paul Gortmaker
2015-12-09 23:29 ` [PATCH 0/6] drivers/dma: drop modular code from non modular drivers Arnd Bergmann
2015-12-10 0:17 ` Paul Gortmaker
2015-12-10 3:12 ` Vinod Koul
2015-12-10 9:01 ` Arnd Bergmann
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=1449703322-17762-4-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.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