| 1 | Index: linux-3.7-rc8/arch/mips/pci/pci-lantiq.c |
| 2 | =================================================================== |
| 3 | --- linux-3.7-rc8.orig/arch/mips/pci/pci-lantiq.c 2012-12-03 20:22:37.000000000 +0100 |
| 4 | +++ linux-3.7-rc8/arch/mips/pci/pci-lantiq.c 2012-12-14 23:28:24.355606776 +0100 |
| 5 | @@ -129,8 +129,15 @@ |
| 6 | |
| 7 | /* setup reset gpio used by pci */ |
| 8 | reset_gpio = of_get_named_gpio(node, "gpio-reset", 0); |
| 9 | - if (gpio_is_valid(reset_gpio)) |
| 10 | - devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset"); |
| 11 | + if (gpio_is_valid(reset_gpio)) { |
| 12 | + int ret = devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset"); |
| 13 | + if (ret) { |
| 14 | + dev_err(&pdev->dev, |
| 15 | + "failed to request gpio %d\n", reset_gpio); |
| 16 | + return ret; |
| 17 | + } |
| 18 | + gpio_direction_output(reset_gpio, 1); |
| 19 | + } |
| 20 | |
| 21 | /* enable auto-switching between PCI and EBU */ |
| 22 | ltq_pci_w32(0xa, PCI_CR_CLK_CTRL); |
| 23 | |