diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-08-13 10:36:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-14 00:50:36 -0400 |
commit | f43e04ec46b67071d432fc3f368dc9891a3443e5 (patch) | |
tree | 2378409c84f43ae86fdb6c12951e78b144683190 /drivers/gpio | |
parent | 3bf671af14d591ede9251acb0085e8017f3705e7 (diff) |
GPIO: gpio-pxa: fix building without CONFIG_OF
Commit 7212157267 ("GPIO: gpio-pxa: fix devicetree functions") added an
"xlate" function pointer to the irq_domain_ops, but this function is nor
declared or defined anywhere when CONFIG_OF is disabled, causing the
build error:
drivers/gpio/gpio-pxa.c:532:11: error: 'irq_domain_xlate_twocell' undeclared here (not in a function)
Extending the DT-only code section to cover the irq_domain_ops and the
pxa_gpio_dt_ids solves this problem and makes it clearer which code is
actually used without DT.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-pxa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 793767b0962a..9cac88a65f78 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c | |||
@@ -512,6 +512,7 @@ static int pxa_gpio_nums(void) | |||
512 | return count; | 512 | return count; |
513 | } | 513 | } |
514 | 514 | ||
515 | #ifdef CONFIG_OF | ||
515 | static struct of_device_id pxa_gpio_dt_ids[] = { | 516 | static struct of_device_id pxa_gpio_dt_ids[] = { |
516 | { .compatible = "mrvl,pxa-gpio" }, | 517 | { .compatible = "mrvl,pxa-gpio" }, |
517 | { .compatible = "mrvl,mmp-gpio", .data = (void *)MMP_GPIO }, | 518 | { .compatible = "mrvl,mmp-gpio", .data = (void *)MMP_GPIO }, |
@@ -532,7 +533,6 @@ const struct irq_domain_ops pxa_irq_domain_ops = { | |||
532 | .xlate = irq_domain_xlate_twocell, | 533 | .xlate = irq_domain_xlate_twocell, |
533 | }; | 534 | }; |
534 | 535 | ||
535 | #ifdef CONFIG_OF | ||
536 | static int __devinit pxa_gpio_probe_dt(struct platform_device *pdev) | 536 | static int __devinit pxa_gpio_probe_dt(struct platform_device *pdev) |
537 | { | 537 | { |
538 | int ret, nr_banks, nr_gpios, irq_base; | 538 | int ret, nr_banks, nr_gpios, irq_base; |
@@ -679,7 +679,7 @@ static struct platform_driver pxa_gpio_driver = { | |||
679 | .probe = pxa_gpio_probe, | 679 | .probe = pxa_gpio_probe, |
680 | .driver = { | 680 | .driver = { |
681 | .name = "pxa-gpio", | 681 | .name = "pxa-gpio", |
682 | .of_match_table = pxa_gpio_dt_ids, | 682 | .of_match_table = of_match_ptr(pxa_gpio_dt_ids), |
683 | }, | 683 | }, |
684 | }; | 684 | }; |
685 | 685 | ||