aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-pxa.c')
-rw-r--r--drivers/gpio/gpio-pxa.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index fe74b0cc2bcb..a0905b20f48e 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -574,19 +574,18 @@ static int pxa_gpio_probe(struct platform_device *pdev)
574 int gpio, irq, ret, use_of = 0; 574 int gpio, irq, ret, use_of = 0;
575 int irq0 = 0, irq1 = 0, irq_mux, gpio_offset = 0; 575 int irq0 = 0, irq1 = 0, irq_mux, gpio_offset = 0;
576 576
577 ret = pxa_gpio_probe_dt(pdev); 577 info = dev_get_platdata(&pdev->dev);
578 if (ret < 0) { 578 if (info) {
579 irq_base = info->irq_base;
580 if (irq_base <= 0)
581 return -EINVAL;
579 pxa_last_gpio = pxa_gpio_nums(pdev); 582 pxa_last_gpio = pxa_gpio_nums(pdev);
580#ifdef CONFIG_ARCH_PXA
581 if (gpio_is_pxa_type(gpio_type))
582 irq_base = PXA_GPIO_TO_IRQ(0);
583#endif
584#ifdef CONFIG_ARCH_MMP
585 if (gpio_is_mmp_type(gpio_type))
586 irq_base = MMP_GPIO_TO_IRQ(0);
587#endif
588 } else { 583 } else {
584 irq_base = 0;
589 use_of = 1; 585 use_of = 1;
586 ret = pxa_gpio_probe_dt(pdev);
587 if (ret < 0)
588 return -EINVAL;
590 } 589 }
591 590
592 if (!pxa_last_gpio) 591 if (!pxa_last_gpio)
@@ -623,7 +622,6 @@ static int pxa_gpio_probe(struct platform_device *pdev)
623 } 622 }
624 623
625 /* Initialize GPIO chips */ 624 /* Initialize GPIO chips */
626 info = dev_get_platdata(&pdev->dev);
627 pxa_init_gpio_chip(pxa_last_gpio, info ? info->gpio_set_wake : NULL); 625 pxa_init_gpio_chip(pxa_last_gpio, info ? info->gpio_set_wake : NULL);
628 626
629 /* clear all GPIO edge detects */ 627 /* clear all GPIO edge detects */