aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-davinci.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index a6777e5e0ced..3d000169285d 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -386,7 +386,7 @@ static int __init davinci_gpio_irq_setup(void)
386 * IRQ mux conflicts; gpio_irq_type_unbanked() is only for GPIOs. 386 * IRQ mux conflicts; gpio_irq_type_unbanked() is only for GPIOs.
387 */ 387 */
388 if (soc_info->gpio_unbanked) { 388 if (soc_info->gpio_unbanked) {
389 static struct irq_chip gpio_irqchip_unbanked; 389 static struct irq_chip_type gpio_unbanked;
390 390
391 /* pass "bank 0" GPIO IRQs to AINTC */ 391 /* pass "bank 0" GPIO IRQs to AINTC */
392 chips[0].chip.to_irq = gpio_to_irq_unbanked; 392 chips[0].chip.to_irq = gpio_to_irq_unbanked;
@@ -394,9 +394,10 @@ static int __init davinci_gpio_irq_setup(void)
394 394
395 /* AINTC handles mask/unmask; GPIO handles triggering */ 395 /* AINTC handles mask/unmask; GPIO handles triggering */
396 irq = bank_irq; 396 irq = bank_irq;
397 gpio_irqchip_unbanked = *irq_get_chip(irq); 397 gpio_unbanked = *container_of(irq_get_chip(irq),
398 gpio_irqchip_unbanked.name = "GPIO-AINTC"; 398 struct irq_chip_type, chip);
399 gpio_irqchip_unbanked.irq_set_type = gpio_irq_type_unbanked; 399 gpio_unbanked.chip.name = "GPIO-AINTC";
400 gpio_unbanked.chip.irq_set_type = gpio_irq_type_unbanked;
400 401
401 /* default trigger: both edges */ 402 /* default trigger: both edges */
402 g = gpio2regs(0); 403 g = gpio2regs(0);
@@ -405,7 +406,7 @@ static int __init davinci_gpio_irq_setup(void)
405 406
406 /* set the direct IRQs up to use that irqchip */ 407 /* set the direct IRQs up to use that irqchip */
407 for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) { 408 for (gpio = 0; gpio < soc_info->gpio_unbanked; gpio++, irq++) {
408 irq_set_chip(irq, &gpio_irqchip_unbanked); 409 irq_set_chip(irq, &gpio_unbanked.chip);
409 irq_set_handler_data(irq, &chips[gpio / 32]); 410 irq_set_handler_data(irq, &chips[gpio / 32]);
410 irq_set_status_flags(irq, IRQ_TYPE_EDGE_BOTH); 411 irq_set_status_flags(irq, IRQ_TYPE_EDGE_BOTH);
411 } 412 }