PCI: rockchip: Use local struct device pointer consistently
authorShawn Lin <shawn.lin@rock-chips.com>
Thu, 29 Jun 2017 01:22:49 +0000 (09:22 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Sun, 2 Jul 2017 23:45:57 +0000 (18:45 -0500)
We have a local "struct device *dev" in rockchip_pcie_probe().  Use it
consistently throughout the function.  No functional change intended.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pcie-rockchip.c

index 199edd533083c7dcc00cdad043d51dc11e1f1a30..eb070ab2ee3f8f0089b2e8e85e8d60985a3464eb 100644 (file)
@@ -1463,15 +1463,14 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
        if (err)
                goto err_free_res;
 
-       rockchip->msg_region = devm_ioremap(rockchip->dev,
-                                           rockchip->msg_bus_addr, SZ_1M);
+       rockchip->msg_region = devm_ioremap(dev, rockchip->msg_bus_addr, SZ_1M);
        if (!rockchip->msg_region) {
                err = -ENOMEM;
                goto err_free_res;
        }
 
        list_splice_init(&res, &bridge->windows);
-       bridge->dev.parent = &pdev->dev;
+       bridge->dev.parent = dev;
        bridge->sysdata = rockchip;
        bridge->busnr = 0;
        bridge->ops = &rockchip_pcie_ops;