firewall: update to git head
[openwrt.git] / target / linux / lantiq / patches-3.7 / 0124-pci_fix.patch
1 --- a/arch/mips/pci/pci-lantiq.c
2 +++ b/arch/mips/pci/pci-lantiq.c
3 @@ -129,8 +129,15 @@ static int __devinit ltq_pci_startup(str
4  
5         /* setup reset gpio used by pci */
6         reset_gpio = of_get_named_gpio(node, "gpio-reset", 0);
7 -       if (gpio_is_valid(reset_gpio))
8 -               devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset");
9 +       if (gpio_is_valid(reset_gpio)) {
10 +               int ret = devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset");
11 +               if (ret) {
12 +                       dev_err(&pdev->dev,
13 +                               "failed to request gpio %d\n", reset_gpio);
14 +                       return ret;
15 +               }
16 +               gpio_direction_output(reset_gpio, 1);
17 +       }
18  
19         /* enable auto-switching between PCI and EBU */
20         ltq_pci_w32(0xa, PCI_CR_CLK_CTRL);