From patchwork Wed Dec 9 23:22:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 7813711 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 2AF63BEEE1 for ; Wed, 9 Dec 2015 23:27:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 406882054B for ; Wed, 9 Dec 2015 23:27:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4AA05204E2 for ; Wed, 9 Dec 2015 23:27:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753942AbbLIX1a (ORCPT ); Wed, 9 Dec 2015 18:27:30 -0500 Received: from mail5.windriver.com ([192.103.53.11]:55887 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753954AbbLIXXu (ORCPT ); Wed, 9 Dec 2015 18:23:50 -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 tB9NNm6V002204 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Wed, 9 Dec 2015 15:23:48 -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:48 -0800 From: Paul Gortmaker To: CC: Paul Gortmaker , Laxman Dewangan , Dan Williams , Vinod Koul , Stephen Warren , Thierry Reding , Alexandre Courbot , , Subject: [PATCH 6/6] drivers/dma: make tegra20-apb-dma.c explicitly non-modular Date: Wed, 9 Dec 2015 18:22:02 -0500 Message-ID: <1449703322-17762-7-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 TEGRA20_APB_DMA drivers/dma/Kconfig: bool "NVIDIA Tegra20 APB 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. We don't replace module.h with init.h since the file already has that. 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: Laxman Dewangan Cc: Dan Williams Cc: Vinod Koul Cc: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Cc: dmaengine@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/dma/tegra20-apb-dma.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index 935da8192f59..eee783cee45b 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -3,6 +3,8 @@ * * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. * + * Author: Laxman Dewangan + * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. @@ -26,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -1309,7 +1310,6 @@ static const struct of_device_id tegra_dma_of_match[] = { }, { }, }; -MODULE_DEVICE_TABLE(of, tegra_dma_of_match); static int tegra_dma_probe(struct platform_device *pdev) { @@ -1488,27 +1488,6 @@ err_irq: return ret; } -static int tegra_dma_remove(struct platform_device *pdev) -{ - struct tegra_dma *tdma = platform_get_drvdata(pdev); - int i; - struct tegra_dma_channel *tdc; - - dma_async_device_unregister(&tdma->dma_dev); - - for (i = 0; i < tdma->chip_data->nr_channels; ++i) { - tdc = &tdma->channels[i]; - free_irq(tdc->irq, tdc); - tasklet_kill(&tdc->tasklet); - } - - pm_runtime_disable(&pdev->dev); - if (!pm_runtime_status_suspended(&pdev->dev)) - tegra_dma_runtime_suspend(&pdev->dev); - - return 0; -} - static int tegra_dma_runtime_suspend(struct device *dev) { struct tegra_dma *tdma = dev_get_drvdata(dev); @@ -1616,15 +1595,9 @@ static struct platform_driver tegra_dmac_driver = { .driver = { .name = "tegra-apbdma", .pm = &tegra_dma_dev_pm_ops, + .suppress_bind_attrs = true, .of_match_table = tegra_dma_of_match, }, .probe = tegra_dma_probe, - .remove = tegra_dma_remove, }; - -module_platform_driver(tegra_dmac_driver); - -MODULE_ALIAS("platform:tegra20-apbdma"); -MODULE_DESCRIPTION("NVIDIA Tegra APB DMA Controller driver"); -MODULE_AUTHOR("Laxman Dewangan "); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(tegra_dmac_driver);