aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pci/pci-lantiq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/pci/pci-lantiq.c')
-rw-r--r--arch/mips/pci/pci-lantiq.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
index 910fb4c20b9e..879077b01155 100644
--- a/arch/mips/pci/pci-lantiq.c
+++ b/arch/mips/pci/pci-lantiq.c
@@ -129,8 +129,16 @@ static int ltq_pci_startup(struct platform_device *pdev)
129 129
130 /* setup reset gpio used by pci */ 130 /* setup reset gpio used by pci */
131 reset_gpio = of_get_named_gpio(node, "gpio-reset", 0); 131 reset_gpio = of_get_named_gpio(node, "gpio-reset", 0);
132 if (gpio_is_valid(reset_gpio)) 132 if (gpio_is_valid(reset_gpio)) {
133 devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset"); 133 int ret = devm_gpio_request(&pdev->dev,
134 reset_gpio, "pci-reset");
135 if (ret) {
136 dev_err(&pdev->dev,
137 "failed to request gpio %d\n", reset_gpio);
138 return ret;
139 }
140 gpio_direction_output(reset_gpio, 1);
141 }
134 142
135 /* enable auto-switching between PCI and EBU */ 143 /* enable auto-switching between PCI and EBU */
136 ltq_pci_w32(0xa, PCI_CR_CLK_CTRL); 144 ltq_pci_w32(0xa, PCI_CR_CLK_CTRL);