From patchwork Wed Dec 9 23:22:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 7813651 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 495EC9F349 for ; Wed, 9 Dec 2015 23:26:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A29132054B for ; Wed, 9 Dec 2015 23:26:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A983F204AF for ; Wed, 9 Dec 2015 23:26:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a6o69-0005nn-Gt; Wed, 09 Dec 2015 23:24:37 +0000 Received: from mail.windriver.com ([147.11.1.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a6o5i-0005BL-Rt for linux-arm-kernel@lists.infradead.org; Wed, 09 Dec 2015 23:24:13 +0000 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 tB9NNjQE018298 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 9 Dec 2015 15:23:45 -0800 (PST) Received: from yow-lpgnfs-02.corp.ad.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.248.2; Wed, 9 Dec 2015 15:23:45 -0800 From: Paul Gortmaker To: Subject: [PATCH 4/6] drivers/dma: make pxa_dma.c explicitly non-modular Date: Wed, 9 Dec 2015 18:22:00 -0500 Message-ID: <1449703322-17762-5-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1449703322-17762-1-git-send-email-paul.gortmaker@windriver.com> References: <1449703322-17762-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151209_152411_172156_6F797EF5 X-CRM114-Status: GOOD ( 23.13 ) X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vinod Koul , Haojian Zhuang , Paul Gortmaker , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, Dan Williams , Robert Jarzmik , Daniel Mack Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig currently controlling compilation of this code is: drivers/dma/Kconfig:config PXA_DMA drivers/dma/Kconfig: bool "PXA 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: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Dan Williams Cc: Vinod Koul Cc: linux-arm-kernel@lists.infradead.org Cc: dmaengine@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/dma/pxa_dma.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c index f2a0310ae771..5d6ab9ff2222 100644 --- a/drivers/dma/pxa_dma.c +++ b/drivers/dma/pxa_dma.c @@ -1,4 +1,5 @@ /* + * Marvell PXA Peripheral DMA Driver * Copyright 2015 Robert Jarzmik * * This program is free software; you can redistribute it and/or modify @@ -7,7 +8,6 @@ */ #include -#include #include #include #include @@ -400,13 +400,8 @@ err_root: pr_err("pxad: debugfs is not available\n"); } -static void pxad_cleanup_debugfs(struct pxad_device *pdev) -{ - debugfs_remove_recursive(pdev->dbgfs_root); -} #else static inline void pxad_init_debugfs(struct pxad_device *pdev) {} -static inline void pxad_cleanup_debugfs(struct pxad_device *pdev) {} #endif /* @@ -1246,27 +1241,6 @@ static enum dma_status pxad_tx_status(struct dma_chan *dchan, return ret; } -static void pxad_free_channels(struct dma_device *dmadev) -{ - struct pxad_chan *c, *cn; - - list_for_each_entry_safe(c, cn, &dmadev->channels, - vc.chan.device_node) { - list_del(&c->vc.chan.device_node); - tasklet_kill(&c->vc.task); - } -} - -static int pxad_remove(struct platform_device *op) -{ - struct pxad_device *pdev = platform_get_drvdata(op); - - pxad_cleanup_debugfs(pdev); - pxad_free_channels(&pdev->slave); - dma_async_device_unregister(&pdev->slave); - return 0; -} - static int pxad_init_phys(struct platform_device *op, struct pxad_device *pdev, unsigned int nb_phy_chans) @@ -1315,7 +1289,6 @@ static const struct of_device_id const pxad_dt_ids[] = { { .compatible = "marvell,pdma-1.0", }, {} }; -MODULE_DEVICE_TABLE(of, pxad_dt_ids); static struct dma_chan *pxad_dma_xlate(struct of_phandle_args *dma_spec, struct of_dma *ofdma) @@ -1448,12 +1421,13 @@ static const struct platform_device_id pxad_id_table[] = { static struct platform_driver pxad_driver = { .driver = { .name = "pxa-dma", + .suppress_bind_attrs = true, .of_match_table = pxad_dt_ids, }, .id_table = pxad_id_table, .probe = pxad_probe, - .remove = pxad_remove, }; +builtin_platform_driver(pxad_driver); bool pxad_filter_fn(struct dma_chan *chan, void *param) { @@ -1478,9 +1452,3 @@ int pxad_toggle_reserved_channel(int legacy_channel) return 0; } EXPORT_SYMBOL_GPL(pxad_toggle_reserved_channel); - -module_platform_driver(pxad_driver); - -MODULE_DESCRIPTION("Marvell PXA Peripheral DMA Driver"); -MODULE_AUTHOR("Robert Jarzmik "); -MODULE_LICENSE("GPL v2");