Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
From: <daire.mcnamara@microchip.com>
To: <lorenzo.pieralisi@arm.com>, <bhelgaas@google.com>,
	<linux-pci@vger.kernel.org>, <robh@kernel.org>,
	<robh+dt@kernel.org>, <devicetree@vger.kernel.org>,
	<david.abdurachmanov@gmail.com>
Cc: Daire McNamara <daire.mcnamara@microchip.com>
Subject: [PATCH v17 1/3] PCI: Call platform_set_drvdata earlier in devm_pci_alloc_host_bridge
Date: Thu, 22 Oct 2020 14:22:21 +0100
Message-ID: <20201022132223.17789-2-daire.mcnamara@microchip.com> (raw)
In-Reply-To: <20201022132223.17789-1-daire.mcnamara@microchip.com>

From: Daire McNamara <daire.mcnamara@microchip.com>

Many drivers can now use pci_host_common_probe() directly.
Their hardware window setup can be moved from their 'custom' probe
functions to individual driver init functions.

Signed-off-by: Daire McNamara <daire.mcnamara@microchip.com>
---
 drivers/pci/controller/pci-host-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c
index 6ce34a1deecb..6ab694f8d283 100644
--- a/drivers/pci/controller/pci-host-common.c
+++ b/drivers/pci/controller/pci-host-common.c
@@ -64,6 +64,8 @@ int pci_host_common_probe(struct platform_device *pdev)
 	if (!bridge)
 		return -ENOMEM;
 
+	platform_set_drvdata(pdev, bridge);
+
 	of_pci_check_probe_only();
 
 	/* Parse and map our Configuration Space windows */
@@ -78,8 +80,6 @@ int pci_host_common_probe(struct platform_device *pdev)
 	bridge->sysdata = cfg;
 	bridge->ops = (struct pci_ops *)&ops->pci_ops;
 
-	platform_set_drvdata(pdev, bridge);
-
 	return pci_host_probe(bridge);
 }
 EXPORT_SYMBOL_GPL(pci_host_common_probe);
-- 
2.25.1


  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 13:22 [PATCH v17 0/3] PCI: microchip: Add host driver for Microchip PCIe controller daire.mcnamara
2020-10-22 13:22 ` daire.mcnamara [this message]
2020-10-22 13:22 ` [PATCH v17 2/3] dt-bindings: PCI: microchip: Add Microchip PolarFire host binding daire.mcnamara
2020-10-23 16:41   ` Rob Herring
2020-10-22 13:22 ` [PATCH v17 3/3] PCI: microchip: Add host driver for Microchip PCIe controller daire.mcnamara
2020-10-28 17:21   ` Ben Dooks
     [not found]     ` <MN2PR11MB426909C2B84E95AF301C404B96100@MN2PR11MB4269.namprd11.prod.outlook.com>
2020-11-02 11:15       ` Ben Dooks
2020-11-18 16:39         ` Lorenzo Pieralisi
2020-11-18 17:04           ` Ben Dooks
     [not found]             ` <MN2PR11MB42693A7C10C71C327763FA8B96E00@MN2PR11MB4269.namprd11.prod.outlook.com>
2020-11-23 11:46               ` Ben Dooks
2020-11-18 16:44         ` Ben Dooks
2020-11-18 16:35   ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022132223.17789-2-daire.mcnamara@microchip.com \
    --to=daire.mcnamara@microchip.com \
    --cc=bhelgaas@google.com \
    --cc=david.abdurachmanov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git