aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/Kconfig11
-rw-r--r--drivers/gpio/gpio-max730x.c8
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 98dd47a30fc7..66a94103798b 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -50,6 +50,7 @@ config GPIO_DEVRES
50config OF_GPIO 50config OF_GPIO
51 def_bool y 51 def_bool y
52 depends on OF 52 depends on OF
53 depends on HAS_IOMEM
53 54
54config GPIO_ACPI 55config GPIO_ACPI
55 def_bool y 56 def_bool y
@@ -188,7 +189,7 @@ config GPIO_EP93XX
188config GPIO_ETRAXFS 189config GPIO_ETRAXFS
189 bool "Axis ETRAX FS General I/O" 190 bool "Axis ETRAX FS General I/O"
190 depends on CRIS || COMPILE_TEST 191 depends on CRIS || COMPILE_TEST
191 depends on OF 192 depends on OF_GPIO
192 select GPIO_GENERIC 193 select GPIO_GENERIC
193 select GPIOLIB_IRQCHIP 194 select GPIOLIB_IRQCHIP
194 help 195 help
@@ -214,7 +215,7 @@ config GPIO_GENERIC_PLATFORM
214 215
215config GPIO_GRGPIO 216config GPIO_GRGPIO
216 tristate "Aeroflex Gaisler GRGPIO support" 217 tristate "Aeroflex Gaisler GRGPIO support"
217 depends on OF 218 depends on OF_GPIO
218 select GPIO_GENERIC 219 select GPIO_GENERIC
219 select IRQ_DOMAIN 220 select IRQ_DOMAIN
220 help 221 help
@@ -312,7 +313,7 @@ config GPIO_MPC8XXX
312config GPIO_MVEBU 313config GPIO_MVEBU
313 def_bool y 314 def_bool y
314 depends on PLAT_ORION 315 depends on PLAT_ORION
315 depends on OF 316 depends on OF_GPIO
316 select GENERIC_IRQ_CHIP 317 select GENERIC_IRQ_CHIP
317 318
318config GPIO_MXC 319config GPIO_MXC
@@ -405,7 +406,7 @@ config GPIO_TEGRA
405 bool "NVIDIA Tegra GPIO support" 406 bool "NVIDIA Tegra GPIO support"
406 default ARCH_TEGRA 407 default ARCH_TEGRA
407 depends on ARCH_TEGRA || COMPILE_TEST 408 depends on ARCH_TEGRA || COMPILE_TEST
408 depends on OF 409 depends on OF_GPIO
409 help 410 help
410 Say yes here to support GPIO pins on NVIDIA Tegra SoCs. 411 Say yes here to support GPIO pins on NVIDIA Tegra SoCs.
411 412
@@ -1099,7 +1100,7 @@ menu "SPI GPIO expanders"
1099 1100
1100config GPIO_74X164 1101config GPIO_74X164
1101 tristate "74x164 serial-in/parallel-out 8-bits shift register" 1102 tristate "74x164 serial-in/parallel-out 8-bits shift register"
1102 depends on OF 1103 depends on OF_GPIO
1103 help 1104 help
1104 Driver for 74x164 compatible serial-in/parallel-out 8-outputs 1105 Driver for 74x164 compatible serial-in/parallel-out 8-outputs
1105 shift registers. This driver can be used to provide access 1106 shift registers. This driver can be used to provide access
diff --git a/drivers/gpio/gpio-max730x.c b/drivers/gpio/gpio-max730x.c
index 08807368f007..946d09195598 100644
--- a/drivers/gpio/gpio-max730x.c
+++ b/drivers/gpio/gpio-max730x.c
@@ -192,6 +192,10 @@ int __max730x_probe(struct max7301 *ts)
192 ts->chip.parent = dev; 192 ts->chip.parent = dev;
193 ts->chip.owner = THIS_MODULE; 193 ts->chip.owner = THIS_MODULE;
194 194
195 ret = gpiochip_add_data(&ts->chip, ts);
196 if (ret)
197 goto exit_destroy;
198
195 /* 199 /*
196 * initialize pullups according to platform data and cache the 200 * initialize pullups according to platform data and cache the
197 * register values for later use. 201 * register values for later use.
@@ -213,10 +217,6 @@ int __max730x_probe(struct max7301 *ts)
213 } 217 }
214 } 218 }
215 219
216 ret = gpiochip_add_data(&ts->chip, ts);
217 if (ret)
218 goto exit_destroy;
219
220 return ret; 220 return ret;
221 221
222exit_destroy: 222exit_destroy: