Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3647012ybl; Sun, 15 Dec 2019 14:50:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwZ1RUBn0VBskYZzkfU3RAFFfgwAwxgXLKmkNBv2RdBV8eKxIt0RBFtOogGx/4z843DDPpf X-Received: by 2002:a9d:4f0f:: with SMTP id d15mr29389759otl.179.1576450204211; Sun, 15 Dec 2019 14:50:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576450204; cv=none; d=google.com; s=arc-20160816; b=0DgQpuwSkpy+02C1lbexL1NJ5RkUyCeRgRHU6MBPDi26AuEzI+D1RSgVpiB8iECBFi UYIFUTWHkgTw7Queim1aK8AAKD8Mpu0KJQ/Q27MEeeQ1kIU5iiStau1146n4Mydk8/0G 8PFIVxVXSHfOtbAnaHPd7bnhE0L2oudoH7j09LLJFQhpOHMR6zKTJROC+vGDaSa6Cnrn e8uAsFbHOjphHyVb2YfmeWPjmny2xssRaez1uxwIKQpWmxx/vTWYrhi6THi/PZwOMb4Q ceDNqkTgGLiXXiXFMihpNgFyGbaBWAByJ2Vor7Aq3IGkbpOSdPGy5JESouf//p5/7izX nMhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=i0oU5g5CjQIetP14HFEjJsItIoa4W1ipl4ajrjt0JKk=; b=ELR/X1RGLrY1BS4DL0F98pRyXYo+gX0mQRVs2/nHHhMtopaVlRzdLFQFfst+YjQiW1 ZNM2MAmsGzgfClLrKRP2sPsAiZI5XJi2/t6OVztjq/zNkd1mSB2HathQr1m2rDaQq+LG Za7Jr0soeMvAU+N+tekyxcg7sEQvp/K2VHf3IdntYgaDCcc1Ts1W4c3IbQbC2LPFbSZO R82oefa7oqIyckqztnmH4uSPyjHdtIBLB7PIPsaYEo7IvqEZRgo6O+lyj66JN3sAMKK+ ENqSTiQXJbKTiIx0wJiCVxcBvcmV5VCKtKTWT0Q4Flc8qCUbU4OO3wlWTXyzpZXn8/Ni idjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kzgaCKL2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j23si8700774otr.48.2019.12.15.14.49.17; Sun, 15 Dec 2019 14:50:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kzgaCKL2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726380AbfLOWkz (ORCPT + 99 others); Sun, 15 Dec 2019 17:40:55 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:44250 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbfLOWkz (ORCPT ); Sun, 15 Dec 2019 17:40:55 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-10.nifty.com with ESMTP id xBFMdess006397; Mon, 16 Dec 2019 07:39:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com xBFMdess006397 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1576449581; bh=i0oU5g5CjQIetP14HFEjJsItIoa4W1ipl4ajrjt0JKk=; h=From:To:Cc:Subject:Date:From; b=kzgaCKL2ZBe8y8oSOUSe9RJ0JB6GmD83VGhv9bWLKotEPGtum7t/5vwW+zi5G63Ap cIkIL9qPJQIqI2aL5+Pyz978Qb2bdtuDRUzISectClQsvBU5DGxzy7gY9eDPqXJLo+ pqaW+vC0eREcMFcGvWlpmyX1RL1YtMbpjBvd7WCV9Py0se/dy1WvSNm27epozcJ4nf qNzxbJHV2osBRhuSF7ultgfZEknKJAOKG0WGx26M+p7lUy+hI/ETa6nz7TzwPraTlU q8YObApL6Ko82u/QaHZzd2/3bQrh9ug+pL3REntcZpGj8202ccXoSsgE2Sy3rFrW+Y LX2E2jLs05rDQ== X-Nifty-SrcIP: [126.93.102.113] From: Masahiro Yamada To: Bjorn Helgaas , linux-pci@vger.kernel.org Cc: Masahiro Yamada , Andrew Murray , Kunihiko Hayashi , Lorenzo Pieralisi , Philipp Zabel , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] PCI: uniphier: remove module code from built-in driver Date: Mon, 16 Dec 2019 07:39:37 +0900 Message-Id: <20191215223937.19619-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org builtin_platform_driver() and MODULE_* are always odd combination. This file is not compiled as a module by anyone because CONFIG_PCIE_UNIPHIER is a bool option. Let's 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. Signed-off-by: Masahiro Yamada --- Changes in v2: - update commit description - remove Reviewed-by drivers/pci/controller/dwc/pcie-uniphier.c | 31 +--------------------- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-uniphier.c b/drivers/pci/controller/dwc/pcie-uniphier.c index 8fd7badd59c2..a5401a0b1e58 100644 --- a/drivers/pci/controller/dwc/pcie-uniphier.c +++ b/drivers/pci/controller/dwc/pcie-uniphier.c @@ -9,11 +9,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -171,12 +171,6 @@ static void uniphier_pcie_irq_enable(struct uniphier_pcie_priv *priv) writel(PCL_RCV_INTX_ALL_ENABLE, priv->base + PCL_RCV_INTX); } -static void uniphier_pcie_irq_disable(struct uniphier_pcie_priv *priv) -{ - writel(0, priv->base + PCL_RCV_INT); - writel(0, priv->base + PCL_RCV_INTX); -} - static void uniphier_pcie_irq_ack(struct irq_data *d) { struct pcie_port *pp = irq_data_get_irq_chip_data(d); @@ -397,14 +391,6 @@ static int uniphier_pcie_host_enable(struct uniphier_pcie_priv *priv) return ret; } -static void uniphier_pcie_host_disable(struct uniphier_pcie_priv *priv) -{ - uniphier_pcie_irq_disable(priv); - phy_exit(priv->phy); - reset_control_assert(priv->rst); - clk_disable_unprepare(priv->clk); -} - static const struct dw_pcie_ops dw_pcie_ops = { .start_link = uniphier_pcie_establish_link, .stop_link = uniphier_pcie_stop_link, @@ -456,31 +442,16 @@ static int uniphier_pcie_probe(struct platform_device *pdev) return uniphier_add_pcie_port(priv, pdev); } -static int uniphier_pcie_remove(struct platform_device *pdev) -{ - struct uniphier_pcie_priv *priv = platform_get_drvdata(pdev); - - uniphier_pcie_host_disable(priv); - - return 0; -} - static const struct of_device_id uniphier_pcie_match[] = { { .compatible = "socionext,uniphier-pcie", }, { /* sentinel */ }, }; -MODULE_DEVICE_TABLE(of, uniphier_pcie_match); static struct platform_driver uniphier_pcie_driver = { .probe = uniphier_pcie_probe, - .remove = uniphier_pcie_remove, .driver = { .name = "uniphier-pcie", .of_match_table = uniphier_pcie_match, }, }; builtin_platform_driver(uniphier_pcie_driver); - -MODULE_AUTHOR("Kunihiko Hayashi "); -MODULE_DESCRIPTION("UniPhier PCIe host controller driver"); -MODULE_LICENSE("GPL v2"); -- 2.17.1