Commit f43e04ec authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds

GPIO: gpio-pxa: fix building without CONFIG_OF

Commit 72121572 ("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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3bf671af
...@@ -512,6 +512,7 @@ static int pxa_gpio_nums(void) ...@@ -512,6 +512,7 @@ static int pxa_gpio_nums(void)
return count; return count;
} }
#ifdef CONFIG_OF
static struct of_device_id pxa_gpio_dt_ids[] = { static struct of_device_id pxa_gpio_dt_ids[] = {
{ .compatible = "mrvl,pxa-gpio" }, { .compatible = "mrvl,pxa-gpio" },
{ .compatible = "mrvl,mmp-gpio", .data = (void *)MMP_GPIO }, { .compatible = "mrvl,mmp-gpio", .data = (void *)MMP_GPIO },
...@@ -532,7 +533,6 @@ const struct irq_domain_ops pxa_irq_domain_ops = { ...@@ -532,7 +533,6 @@ const struct irq_domain_ops pxa_irq_domain_ops = {
.xlate = irq_domain_xlate_twocell, .xlate = irq_domain_xlate_twocell,
}; };
#ifdef CONFIG_OF
static int __devinit pxa_gpio_probe_dt(struct platform_device *pdev) static int __devinit pxa_gpio_probe_dt(struct platform_device *pdev)
{ {
int ret, nr_banks, nr_gpios, irq_base; int ret, nr_banks, nr_gpios, irq_base;
...@@ -679,7 +679,7 @@ static struct platform_driver pxa_gpio_driver = { ...@@ -679,7 +679,7 @@ static struct platform_driver pxa_gpio_driver = {
.probe = pxa_gpio_probe, .probe = pxa_gpio_probe,
.driver = { .driver = {
.name = "pxa-gpio", .name = "pxa-gpio",
.of_match_table = pxa_gpio_dt_ids, .of_match_table = of_match_ptr(pxa_gpio_dt_ids),
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment