All of lore.kernel.org
 help / color / mirror / 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>
Cc: <david.abdurachmanov@gmail.com>
Subject: Re: [PATCH v16 1/3] PCI: Call platform_set_drvdata earlier in devm_pci_alloc_host_bridge
Date: Mon, 14 Sep 2020 14:29:56 +0000	[thread overview]
Message-ID: <5f9c11ac-e511-11c2-e0c7-992aa960073e@microchip.com> (raw)
In-Reply-To: <6bd2bce1-1241-e2e1-cab7-c48813584248@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	other threads:[~2020-09-14 14:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14 14:28 [PATCH v16 0/3] PCI: microchip: Add host driver for Microchip PCIe controller Daire.McNamara
2020-09-14 14:29 ` Daire.McNamara [this message]
2020-09-14 14:30 ` [PATCH v16 2/3] dt-bindings: PCI: microchip: Add Microchip PolarFire host binding Daire.McNamara
2020-09-14 14:31 ` [PATCH v16 3/3] PCI: microchip: Add host driver for Microchip PCIe controller Daire.McNamara
  -- strict thread matches above, loose matches on Subject: below --
2020-10-12 10:57 [PATCH v16 0/3] " daire.mcnamara
2020-10-12 10:57 ` [PATCH v16 1/3] PCI: Call platform_set_drvdata earlier in devm_pci_alloc_host_bridge daire.mcnamara
2020-10-12 17:07   ` Rob Herring

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=5f9c11ac-e511-11c2-e0c7-992aa960073e@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.