linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: linux-pci@vger.kernel.org, linux-omap@vger.kernel.org
Subject: [PATCH 8/9] PCI: dra7xx: Move struct pcie_port setup to probe function
Date: Fri, 07 Oct 2016 11:35:01 -0500	[thread overview]
Message-ID: <20161007163501.24926.55838.stgit@bhelgaas-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20161007163350.24926.17545.stgit@bhelgaas-glaptop2.roam.corp.google.com>

Do the basic pcie_port setup in the probe function for consistency with
other drivers.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-dra7xx.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 87c89178..b0d427c 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -266,15 +266,11 @@ static irqreturn_t dra7xx_pcie_irq_handler(int irq, void *arg)
 static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
 				       struct platform_device *pdev)
 {
-	struct device *dev = &pdev->dev;
-	struct pcie_port *pp;
+	struct pcie_port *pp = &dra7xx->pp;
+	struct device *dev = pp->dev;
 	struct resource *res;
 	int ret;
 
-	pp = &dra7xx->pp;
-	pp->dev = dev;
-	pp->ops = &dra7xx_pcie_host_ops;
-
 	pp->irq = platform_get_irq(pdev, 1);
 	if (pp->irq < 0) {
 		dev_err(dev, "missing IRQ resource\n");
@@ -314,6 +310,7 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
 	struct dra7xx_pcie *dra7xx;
+	struct pcie_port *pp;
 	u32 reg;
 	int ret;
 	int irq;
@@ -331,6 +328,10 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)
 	if (!dra7xx)
 		return -ENOMEM;
 
+	pp = &dra7xx->pp;
+	pp->dev = dev;
+	pp->ops = &dra7xx_pcie_host_ops;
+
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
 		dev_err(dev, "missing IRQ resource\n");


  parent reply	other threads:[~2016-10-07 16:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 16:33 [PATCH 1/9] PCI: dra7xx: Rename accessors Bjorn Helgaas
2016-10-07 16:33 ` [PATCH 2/9] PCI: dra7xx: Name private struct pointer "dra7xx" consistently Bjorn Helgaas
2016-10-07 16:34 ` [PATCH 3/9] PCI: dra7xx: Pass device-specific struct to internal functions Bjorn Helgaas
2016-10-07 16:34 ` [PATCH 4/9] PCI: dra7xx: Remove redundant struct device pointer from dra7xx_pcie Bjorn Helgaas
2016-10-07 16:34 ` [PATCH 5/9] PCI: dra7xx: Reorder struct dra7xx_pcie Bjorn Helgaas
2016-10-07 16:34 ` [PATCH 6/9] PCI: dra7xx: Replace dra7xx_pcie_readl_rc() with dw_pcie_readl_rc() Bjorn Helgaas
2016-10-07 16:34 ` [PATCH 7/9] PCI: dra7xx: Add local struct device pointers Bjorn Helgaas
2016-10-07 16:35 ` Bjorn Helgaas [this message]
2016-10-07 16:35 ` [PATCH 9/9] PCI: dra7xx: Set drvdata at end of probe function Bjorn Helgaas

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=20161007163501.24926.55838.stgit@bhelgaas-glaptop2.roam.corp.google.com \
    --to=bhelgaas@google.com \
    --cc=kishon@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pci@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).