From patchwork Sun Jul 3 17:30:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 9211361 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5CD3760752 for ; Sun, 3 Jul 2016 17:34:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D9242860A for ; Sun, 3 Jul 2016 17:34:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40F2E286AA; Sun, 3 Jul 2016 17:34:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id E0B522860A for ; Sun, 3 Jul 2016 17:34:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bJlGB-0005Jv-3t; Sun, 03 Jul 2016 17:32:47 +0000 Received: from mail5.windriver.com ([192.103.53.11] helo=mail5.wrs.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bJlG4-0005GS-3H for linux-arm-kernel@lists.infradead.org; Sun, 03 Jul 2016 17:32:41 +0000 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 u63HWMon030378 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Sun, 3 Jul 2016 10:32:23 -0700 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; Sun, 3 Jul 2016 10:32:22 -0700 From: Paul Gortmaker To: Subject: [PATCH 3/4] bus: tegra-aconnect: make it explicitly non-modular Date: Sun, 3 Jul 2016 13:30:39 -0400 Message-ID: <20160703173040.23612-4-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20160703173040.23612-1-paul.gortmaker@windriver.com> References: <20160703173040.23612-1-paul.gortmaker@windriver.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160703_103240_243032_D1737A0E X-CRM114-Status: GOOD ( 21.43 ) 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: Alexandre Courbot , Stephen Warren , Jon Hunter , Paul Gortmaker , Thierry Reding , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig currently controlling compilation of this code is: drivers/bus/Kconfig:config TEGRA_ACONNECT drivers/bus/Kconfig: bool "Tegra ACONNECT Bus Driver" ...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: Stephen Warren Cc: Thierry Reding Cc: Alexandre Courbot Cc: Jon Hunter Cc: linux-tegra@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker --- drivers/bus/tegra-aconnect.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/bus/tegra-aconnect.c b/drivers/bus/tegra-aconnect.c index 7e4104b74fa8..f3982946ab8a 100644 --- a/drivers/bus/tegra-aconnect.c +++ b/drivers/bus/tegra-aconnect.c @@ -1,6 +1,8 @@ /* * Tegra ACONNECT Bus Driver * + * Author: Jon Hunter + * * Copyright (C) 2016, NVIDIA CORPORATION. All rights reserved. * * This file is subject to the terms and conditions of the GNU General Public @@ -9,7 +11,7 @@ */ #include -#include +#include #include #include #include @@ -66,15 +68,6 @@ clk_destroy: return ret; } -static int tegra_aconnect_remove(struct platform_device *pdev) -{ - pm_runtime_disable(&pdev->dev); - - pm_clk_destroy(&pdev->dev); - - return 0; -} - static int tegra_aconnect_runtime_resume(struct device *dev) { return pm_clk_resume(dev); @@ -94,19 +87,14 @@ static const struct of_device_id tegra_aconnect_of_match[] = { { .compatible = "nvidia,tegra210-aconnect", }, { } }; -MODULE_DEVICE_TABLE(of, tegra_aconnect_of_match); static struct platform_driver tegra_aconnect_driver = { .probe = tegra_aconnect_probe, - .remove = tegra_aconnect_remove, .driver = { .name = "tegra-aconnect", + .suppress_bind_attrs = true, .of_match_table = tegra_aconnect_of_match, .pm = &tegra_aconnect_pm_ops, }, }; -module_platform_driver(tegra_aconnect_driver); - -MODULE_DESCRIPTION("NVIDIA Tegra ACONNECT Bus Driver"); -MODULE_AUTHOR("Jon Hunter "); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(tegra_aconnect_driver);