From: Bjorn Helgaas <bhelgaas@google.com>
To: Richard Zhu <Richard.Zhu@freescale.com>,
Lucas Stach <l.stach@pengutronix.de>
Cc: linux-pci@vger.kernel.org
Subject: [PATCH v2 2/8] PCI: imx6: Remove redundant of_node pointer
Date: Wed, 12 Oct 2016 08:47:48 -0500 [thread overview]
Message-ID: <20161012134748.28919.61148.stgit@bhelgaas-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20161012134335.28919.64137.stgit@bhelgaas-glaptop2.roam.corp.google.com>
"np" and "node" are redundant copies of the of_node pointer. Remove "np"
and use "node" instead. Replace the "fsl,max-link-speed" use with "node"
as well. No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/host/pci-imx6.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 0838176..e20e9e8 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -618,7 +618,6 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct imx6_pcie *imx6_pcie;
struct pcie_port *pp;
- struct device_node *np = dev->of_node;
struct resource *dbi_base;
struct device_node *node = dev->of_node;
int ret;
@@ -643,8 +642,8 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
return PTR_ERR(pp->dbi_base);
/* Fetch GPIOs */
- imx6_pcie->reset_gpio = of_get_named_gpio(np, "reset-gpio", 0);
- imx6_pcie->gpio_active_high = of_property_read_bool(np,
+ imx6_pcie->reset_gpio = of_get_named_gpio(node, "reset-gpio", 0);
+ imx6_pcie->gpio_active_high = of_property_read_bool(node,
"reset-gpio-active-high");
if (gpio_is_valid(imx6_pcie->reset_gpio)) {
ret = devm_gpio_request_one(dev, imx6_pcie->reset_gpio,
@@ -717,7 +716,7 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
imx6_pcie->tx_swing_low = 127;
/* Limit link speed */
- ret = of_property_read_u32(pp->dev->of_node, "fsl,max-link-speed",
+ ret = of_property_read_u32(node, "fsl,max-link-speed",
&imx6_pcie->link_gen);
if (ret)
imx6_pcie->link_gen = 1;
next prev parent reply other threads:[~2016-10-12 13:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 13:47 [PATCH v2 0/8] PCI: imx6: Cleanups Bjorn Helgaas
2016-10-12 13:47 ` [PATCH v2 1/8] PCI: imx6: Add local struct device pointers Bjorn Helgaas
2016-10-12 13:47 ` Bjorn Helgaas [this message]
2016-10-12 13:47 ` [PATCH v2 3/8] PCI: imx6: Removed unused struct imx6_pcie.mem_base Bjorn Helgaas
2016-10-12 13:48 ` [PATCH v2 4/8] PCI: imx6: Pass struct imx6_pcie to PHY accessors Bjorn Helgaas
2016-10-12 13:48 ` [PATCH v2 5/8] PCI: imx6: Pass device-specific struct to internal functions Bjorn Helgaas
2016-10-12 13:48 ` [PATCH v2 6/8] PCI: imx6: Use generic DesignWare accessors Bjorn Helgaas
2016-10-12 13:48 ` [PATCH v2 7/8] PCI: imx6: Reorder struct imx6_pcie Bjorn Helgaas
2016-10-12 13:48 ` [PATCH v2 8/8] PCI: imx6: Remove unused return values Bjorn Helgaas
2016-10-12 16:06 ` [PATCH v2 0/8] PCI: imx6: Cleanups 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=20161012134748.28919.61148.stgit@bhelgaas-glaptop2.roam.corp.google.com \
--to=bhelgaas@google.com \
--cc=Richard.Zhu@freescale.com \
--cc=l.stach@pengutronix.de \
--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).