public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 1/6] drivers/dma: make edma.c explicitly non-modular
Date: Wed, 9 Dec 2015 18:21:57 -0500	[thread overview]
Message-ID: <1449703322-17762-2-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 TI_EDMA
drivers/dma/Kconfig:    bool "TI EDMA 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_init wasn't being used by this driver, we've not any
issues worrying about the init ordering changing with this commit.

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/edma.c | 37 ++++++-------------------------------
 1 file changed, 6 insertions(+), 31 deletions(-)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 0675e268d577..1031a970b523 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -3,6 +3,8 @@
  *
  * Copyright 2012 Texas Instruments
  *
+ * Author: Matt Porter <matt.porter@linaro.org>
+ *
  * 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 version 2.
@@ -20,7 +22,6 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
@@ -2325,21 +2326,6 @@ err_reg1:
 	return ret;
 }
 
-static int edma_remove(struct platform_device *pdev)
-{
-	struct device *dev = &pdev->dev;
-	struct edma_cc *ecc = dev_get_drvdata(dev);
-
-	if (dev->of_node)
-		of_dma_controller_free(dev->of_node);
-	dma_async_device_unregister(&ecc->dma_slave);
-	if (ecc->dma_memcpy)
-		dma_async_device_unregister(ecc->dma_memcpy);
-	edma_free_slot(ecc, ecc->dummy_slot);
-
-	return 0;
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int edma_pm_suspend(struct device *dev)
 {
@@ -2396,11 +2382,11 @@ static const struct dev_pm_ops edma_pm_ops = {
 
 static struct platform_driver edma_driver = {
 	.probe		= edma_probe,
-	.remove		= edma_remove,
 	.driver = {
-		.name	= "edma",
-		.pm	= &edma_pm_ops,
-		.of_match_table = edma_of_ids,
+		.name			= "edma",
+		.pm			= &edma_pm_ops,
+		.of_match_table		= edma_of_ids,
+		.suppress_bind_attrs	= true,
 	},
 };
 
@@ -2439,14 +2425,3 @@ static int edma_init(void)
 	return platform_driver_register(&edma_driver);
 }
 subsys_initcall(edma_init);
-
-static void __exit edma_exit(void)
-{
-	platform_driver_unregister(&edma_driver);
-	platform_driver_unregister(&edma_tptc_driver);
-}
-module_exit(edma_exit);
-
-MODULE_AUTHOR("Matt Porter <matt.porter@linaro.org>");
-MODULE_DESCRIPTION("TI EDMA DMA engine driver");
-MODULE_LICENSE("GPL v2");
-- 
2.6.1


  reply	other threads:[~2015-12-09 23:23 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 ` Paul Gortmaker [this message]
2015-12-09 23:21 ` [PATCH 2/6] drivers/dma: make mmp_pdma.c explicitly non-modular Paul Gortmaker
2015-12-09 23:21 ` [PATCH 3/6] drivers/dma: make mmp_tdma.c " Paul Gortmaker
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-2-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