From patchwork Wed Dec 9 23:21:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 7813751 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1D45CBEEE1 for ; Wed, 9 Dec 2015 23:28:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42EFC204E2 for ; Wed, 9 Dec 2015 23:28:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38188204AF for ; Wed, 9 Dec 2015 23:28:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751467AbbLIX2L (ORCPT ); Wed, 9 Dec 2015 18:28:11 -0500 Received: from mail5.windriver.com ([192.103.53.11]:55883 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750907AbbLIXXp (ORCPT ); Wed, 9 Dec 2015 18:23:45 -0500 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id tB9NNiKx002201 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Wed, 9 Dec 2015 15:23:44 -0800 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:43 -0800 From: Paul Gortmaker To: CC: Paul Gortmaker , Vinod Koul , Dan Williams , Subject: [PATCH 3/6] drivers/dma: make mmp_tdma.c explicitly non-modular Date: Wed, 9 Dec 2015 18:21:59 -0500 Message-ID: <1449703322-17762-4-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 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 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 Cc: Dan Williams Cc: dmaengine@vger.kernel.org Signed-off-by: Paul Gortmaker --- 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 Zhangfei Gao * Copyright: Marvell International Ltd. * * The code contained herein is licensed under the GNU General Public @@ -10,7 +11,6 @@ */ #include -#include #include #include #include @@ -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 "); -MODULE_AUTHOR("Zhangfei Gao "); +builtin_platform_driver(mmp_tdma_driver);