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@xxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: dmaengine@xxxxxxxxxxxxxxx Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx> --- 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@xxxxxxxxxxx> Zhangfei Gao <zhangfei.gao@xxxxxxxxxxx> * 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@xxxxxxxxxxx>"); -MODULE_AUTHOR("Zhangfei Gao <zhangfei.gao@xxxxxxxxxxx>"); +builtin_platform_driver(mmp_tdma_driver); -- 2.6.1 -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html