diff options
Diffstat (limited to 'drivers/gpio/gpio-siox.c')
-rw-r--r-- | drivers/gpio/gpio-siox.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c index 40067e1535d3..26a0ecd487cb 100644 --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c | |||
@@ -211,6 +211,7 @@ static int gpio_siox_get_direction(struct gpio_chip *chip, unsigned int offset) | |||
211 | static int gpio_siox_probe(struct siox_device *sdevice) | 211 | static int gpio_siox_probe(struct siox_device *sdevice) |
212 | { | 212 | { |
213 | struct gpio_siox_ddata *ddata; | 213 | struct gpio_siox_ddata *ddata; |
214 | struct gpio_irq_chip *girq; | ||
214 | int ret; | 215 | int ret; |
215 | 216 | ||
216 | ddata = devm_kzalloc(&sdevice->dev, sizeof(*ddata), GFP_KERNEL); | 217 | ddata = devm_kzalloc(&sdevice->dev, sizeof(*ddata), GFP_KERNEL); |
@@ -239,18 +240,15 @@ static int gpio_siox_probe(struct siox_device *sdevice) | |||
239 | ddata->ichip.irq_unmask = gpio_siox_irq_unmask; | 240 | ddata->ichip.irq_unmask = gpio_siox_irq_unmask; |
240 | ddata->ichip.irq_set_type = gpio_siox_irq_set_type; | 241 | ddata->ichip.irq_set_type = gpio_siox_irq_set_type; |
241 | 242 | ||
242 | ret = gpiochip_add(&ddata->gchip); | 243 | girq = &ddata->gchip.irq; |
243 | if (ret) { | 244 | girq->chip = &ddata->ichip; |
244 | dev_err(&sdevice->dev, | 245 | girq->default_type = IRQ_TYPE_NONE; |
245 | "Failed to register gpio chip (%d)\n", ret); | 246 | girq->handler = handle_level_irq; |
246 | return ret; | ||
247 | } | ||
248 | 247 | ||
249 | ret = gpiochip_irqchip_add(&ddata->gchip, &ddata->ichip, | 248 | ret = gpiochip_add(&ddata->gchip); |
250 | 0, handle_level_irq, IRQ_TYPE_NONE); | ||
251 | if (ret) | 249 | if (ret) |
252 | dev_err(&sdevice->dev, | 250 | dev_err(&sdevice->dev, |
253 | "Failed to register irq chip (%d)\n", ret); | 251 | "Failed to register gpio chip (%d)\n", ret); |
254 | 252 | ||
255 | return ret; | 253 | return ret; |
256 | } | 254 | } |