From patchwork Thu Jan 8 22:17:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 5595881 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 DE0B2C058D for ; Thu, 8 Jan 2015 22:17:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D11EE2052C for ; Thu, 8 Jan 2015 22:17:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05E0120513 for ; Thu, 8 Jan 2015 22:17:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754005AbbAHWRl (ORCPT ); Thu, 8 Jan 2015 17:17:41 -0500 Received: from mail-ig0-f169.google.com ([209.85.213.169]:61110 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbbAHWRl (ORCPT ); Thu, 8 Jan 2015 17:17:41 -0500 Received: by mail-ig0-f169.google.com with SMTP id z20so4812693igj.0; Thu, 08 Jan 2015 14:17:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=644Yoj3ahUxGPtCBohLuY/ha+tljkV3MBt/Ovus0khE=; b=RtZnm4fbkiPmmUawYhVRuIVNPLwxeRGIStCppFWX2ZoMRiXsQUwYQrxMM70Y20+gLr N4AXvz7Hw5tohzwPgu69xxJEOgEFkKcLrR1EX97OdILYj5POxP08AKibk7QfgI616ITj 54LiVbKmzFZMwi8sS8CXAoYlWzMNnrZ3i25lJ2pTYsZQcEEvyPzfs8yIfEP3l2zOnntd THiqD54kG8ASViqkn1QXu6gmPk7Q/9CKo13Mntz+6phXbFzdSBR/deBRGeS1rnzYsCPQ 0uFIA8LbVmuh/wt5/1qIQl/xAKxjO+ZuF8Cjndn1WnMgvCTJoBcctOum6cgGrlPCC0yb PDOw== X-Received: by 10.50.77.74 with SMTP id q10mr12391072igw.30.1420755460494; Thu, 08 Jan 2015 14:17:40 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1301:cdbf:9fd4:d9c6:d7ea]) by mx.google.com with ESMTPSA id kz4sm981317igb.17.2015.01.08.14.17.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Jan 2015 14:17:39 -0800 (PST) Date: Thu, 8 Jan 2015 14:17:36 -0800 From: Dmitry Torokhov To: Murali Karicheri Cc: Bjorn Helgaas , Santosh Shilimkar , Arnd Bergmann , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] PCI: keystone: fix incorrect annotations on probe and remove Message-ID: <20150108221736.GA39839@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 Even though platform bus is not hot-pluggable, devices on it can be unbound from the driver and bound back to it via sysfs, so we should not be using __init annotations on probe() and __exit annotations on remove() methods. Signed-off-by: Dmitry Torokhov --- Not tested, found by casual code inspection. drivers/pci/host/pci-keystone.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c index 1b893bc..7b84e1d 100644 --- a/drivers/pci/host/pci-keystone.c +++ b/drivers/pci/host/pci-keystone.c @@ -332,7 +332,7 @@ static const struct of_device_id ks_pcie_of_match[] = { }; MODULE_DEVICE_TABLE(of, ks_pcie_of_match); -static int __exit ks_pcie_remove(struct platform_device *pdev) +static int ks_pcie_remove(struct platform_device *pdev) { struct keystone_pcie *ks_pcie = platform_get_drvdata(pdev); @@ -341,7 +341,7 @@ static int __exit ks_pcie_remove(struct platform_device *pdev) return 0; } -static int __init ks_pcie_probe(struct platform_device *pdev) +static int ks_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct keystone_pcie *ks_pcie; @@ -398,9 +398,9 @@ fail_clk: return ret; } -static struct platform_driver ks_pcie_driver __refdata = { +static struct platform_driver ks_pcie_driver = { .probe = ks_pcie_probe, - .remove = __exit_p(ks_pcie_remove), + .remove = ks_pcie_remove, .driver = { .name = "keystone-pcie", .owner = THIS_MODULE,