From patchwork Wed Dec 9 23:21:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 7813731 Return-Path: X-Original-To: patchwork-dmaengine@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 7D9199F349 for ; Wed, 9 Dec 2015 23:28:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 966C8204E2 for ; Wed, 9 Dec 2015 23:28:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 96439204AF for ; Wed, 9 Dec 2015 23:28:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754059AbbLIXXq (ORCPT ); Wed, 9 Dec 2015 18:23:46 -0500 Received: from mail.windriver.com ([147.11.1.11]:63054 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753954AbbLIXXn (ORCPT ); Wed, 9 Dec 2015 18:23:43 -0500 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 tB9NNfjW018293 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 9 Dec 2015 15:23:41 -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:41 -0800 From: Paul Gortmaker To: CC: Paul Gortmaker , Vinod Koul , Dan Williams , Subject: [PATCH 1/6] drivers/dma: make edma.c explicitly non-modular Date: Wed, 9 Dec 2015 18:21:57 -0500 Message-ID: <1449703322-17762-2-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 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 Cc: Dan Williams Cc: dmaengine@vger.kernel.org Signed-off-by: Paul Gortmaker --- 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 + * * 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 #include #include -#include #include #include #include @@ -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 "); -MODULE_DESCRIPTION("TI EDMA DMA engine driver"); -MODULE_LICENSE("GPL v2");