From: Bjorn Helgaas Date: Mon, 24 Aug 2015 19:15:05 +0000 (-0500) Subject: Merge branches 'pci/host-dra7xx', 'pci/host-imx6' and 'pci/host-spear' into next X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2fc32c92593dd7900c0635398800214733b8b397;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git Merge branches 'pci/host-dra7xx', 'pci/host-imx6' and 'pci/host-spear' into next * pci/host-dra7xx: PCI: dra7xx: Remove unneeded use of IS_ERR_VALUE() * pci/host-imx6: PCI: imx6: Simplify a trivial if-return sequence * pci/host-spear: PCI: spear: Use BUG_ON() instead of condition followed by BUG() --- 2fc32c92593dd7900c0635398800214733b8b397 diff --cc drivers/pci/host/pci-dra7xx.c index 52e2da7b3cd7,190989908a1a,80db09e47800,80db09e47800..199e29a044cd --- a/drivers/pci/host/pci-dra7xx.c +++ b/drivers/pci/host/pci-dra7xx.c @@@@@ -396,25 -397,25 -382,9 -382,9 +396,25 @@@@@ static int __init dra7xx_pcie_probe(str pm_runtime_enable(dev); ret = pm_runtime_get_sync(dev); - -- if (IS_ERR_VALUE(ret)) { + ++ if (ret < 0) { dev_err(dev, "pm_runtime_get_sync failed\n"); -- goto err_phy; ++ goto err_get_sync; ++ } ++ ++ gpio_sel = of_get_gpio_flags(dev->of_node, 0, &flags); ++ if (gpio_is_valid(gpio_sel)) { ++ gpio_flags = (flags & OF_GPIO_ACTIVE_LOW) ? ++ GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH; ++ ret = devm_gpio_request_one(dev, gpio_sel, gpio_flags, ++ "pcie_reset"); ++ if (ret) { ++ dev_err(&pdev->dev, "gpio%d request failed, ret %d\n", ++ gpio_sel, ret); ++ goto err_gpio; ++ } ++ } else if (gpio_sel == -EPROBE_DEFER) { ++ ret = -EPROBE_DEFER; ++ goto err_gpio; } reg = dra7xx_pcie_readl(dra7xx, PCIECTRL_DRA7XX_CONF_DEVICE_CMD);