All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Grant Likely <grant.likely@secretlab.ca>,
	Shawn Guo <shawn.guo@linaro.org>, Daniel Mack <zonque@gmail.com>,
	Axel Lin <axel.lin@gmail.com>, Alan Cox <alan@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	Julia Lawall <Julia.Lawall@lip6.fr>
Subject: Re: [GIT PULL] gpio fixes for v3.6-rc1
Date: Mon, 13 Aug 2012 14:36:10 +0000	[thread overview]
Message-ID: <201208131436.11122.arnd@arndb.de> (raw)
In-Reply-To: <CACRpkdaixT=Zn69x9_b9G2nQFm4cu2S5Uo23ww909MJFH2yWwQ@mail.gmail.com>

On Friday 10 August 2012, Linus Walleij wrote:
> Daniel Mack (1):
>       GPIO: gpio-pxa: fix devicetree functions
> 

Unfortunately, this one caused a build regression, see the fix below.
I also wonder why pxa_irq_domain_ops isn't static.

	Arnd

8<----
GPIO: gpio-pxa: fix building without CONFIG_OF

Patch 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>

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 793767b0..9cac88a 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -512,6 +512,7 @@ static int pxa_gpio_nums(void)
 	return count;
 }
 
+#ifdef CONFIG_OF
 static struct of_device_id pxa_gpio_dt_ids[] = {
 	{ .compatible = "mrvl,pxa-gpio" },
 	{ .compatible = "mrvl,mmp-gpio", .data = (void *)MMP_GPIO },
@@ -532,7 +533,6 @@ const struct irq_domain_ops pxa_irq_domain_ops = {
 	.xlate	= irq_domain_xlate_twocell,
 };
 
-#ifdef CONFIG_OF
 static int __devinit pxa_gpio_probe_dt(struct platform_device *pdev)
 {
 	int ret, nr_banks, nr_gpios, irq_base;
@@ -679,7 +679,7 @@ static struct platform_driver pxa_gpio_driver = {
 	.probe		= pxa_gpio_probe,
 	.driver		= {
 		.name	= "pxa-gpio",
-		.of_match_table = pxa_gpio_dt_ids,
+		.of_match_table = of_match_ptr(pxa_gpio_dt_ids),
 	},
 };
 

  reply	other threads:[~2012-08-13 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10  6:47 [GIT PULL] gpio fixes for v3.6-rc1 Linus Walleij
2012-08-13 14:36 ` Arnd Bergmann [this message]
2012-08-14 12:38   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201208131436.11122.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Julia.Lawall@lip6.fr \
    --cc=alan@linux.intel.com \
    --cc=axel.lin@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=shawn.guo@linaro.org \
    --cc=torvalds@linux-foundation.org \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.