* [PATCH] mfd wm8350: rename static gpio_set_debounce()
@ 2011-08-10 8:05 Sascha Hauer
2011-08-10 10:41 ` Mark Brown
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Sascha Hauer @ 2011-08-10 8:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Mark Brown, Liam Girdwood, Samuel Ortiz, Robert Schwebel
The kernel already has a function with this name declared
in asm-generic/gpio.h. So if this header leaks into wm8350/gpio.c
we get
drivers/mfd/wm8350-gpio.c:40:12: error: conflicting types for 'gpio_set_debounce'
include/asm-generic/gpio.h:156:12: note: previous declaration of 'gpio_set_debounce' was here
Fix this by adding a wm8350_ prefix to the function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
This is the minimal solution to this problem. It would be more
consistent though not required to add a wm8350_ prefix to the
other functions in this file aswell. Let me know what you prefer.
drivers/mfd/wm8350-gpio.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/wm8350-gpio.c b/drivers/mfd/wm8350-gpio.c
index ebf99be..d584f6b 100644
--- a/drivers/mfd/wm8350-gpio.c
+++ b/drivers/mfd/wm8350-gpio.c
@@ -37,7 +37,7 @@ static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir)
return ret;
}
-static int gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db)
+static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db)
{
if (db == WM8350_GPIO_DEBOUNCE_ON)
return wm8350_set_bits(wm8350, WM8350_GPIO_DEBOUNCE,
@@ -210,7 +210,7 @@ int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func,
goto err;
if (gpio_set_polarity(wm8350, gpio, pol))
goto err;
- if (gpio_set_debounce(wm8350, gpio, debounce))
+ if (wm8350_gpio_set_debounce(wm8350, gpio, debounce))
goto err;
if (gpio_set_dir(wm8350, gpio, dir))
goto err;
--
1.7.5.4
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] mfd wm8350: rename static gpio_set_debounce()
2011-08-10 8:05 [PATCH] mfd wm8350: rename static gpio_set_debounce() Sascha Hauer
@ 2011-08-10 10:41 ` Mark Brown
2011-08-15 6:34 ` Uwe Kleine-König
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2011-08-10 10:41 UTC (permalink / raw)
To: Sascha Hauer; +Cc: linux-kernel, Liam Girdwood, Samuel Ortiz, Robert Schwebel
On Wed, Aug 10, 2011 at 10:05:49AM +0200, Sascha Hauer wrote:
>
> The kernel already has a function with this name declared
> in asm-generic/gpio.h. So if this header leaks into wm8350/gpio.c
> we get
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mfd wm8350: rename static gpio_set_debounce()
2011-08-10 8:05 [PATCH] mfd wm8350: rename static gpio_set_debounce() Sascha Hauer
@ 2011-08-15 6:34 ` Uwe Kleine-König
2011-08-15 6:34 ` Uwe Kleine-König
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2011-08-15 6:34 UTC (permalink / raw)
To: Sascha Hauer
Cc: linux-kernel, Mark Brown, Liam Girdwood, Samuel Ortiz,
Robert Schwebel, Shawn Guo, Grant Likely, linux-arm-kernel
Hello,
[extended the audience a bit]
On Wed, Aug 10, 2011 at 10:05:49AM +0200, Sascha Hauer wrote:
>
> The kernel already has a function with this name declared
> in asm-generic/gpio.h. So if this header leaks into wm8350/gpio.c
> we get
note the "if" is real on arm/imx since
14305e6 (ARM: mxc: use ARCH_NR_GPIOS to define gpio number)
That commit adds an #include <asm-generic/gpio.h> to
arch/arm/plat-mxc/include/mach/irqs.h and so you get the gpio stuff when
#including <linux/interrupt.h> (via linux/interrupt.h -> linux/irqnr.h
-> asm/irq.h -> mach/irqs.h).
I think this is a bit unfortunate, but I havn't looked if it could be
prevented somehow.
> drivers/mfd/wm8350-gpio.c:40:12: error: conflicting types for 'gpio_set_debounce'
> include/asm-generic/gpio.h:156:12: note: previous declaration of 'gpio_set_debounce' was here
>
> Fix this by adding a wm8350_ prefix to the function.
Nevertheless Sascha's patch is OK as gpio_set_debounce is a too generic
name for a function in an mfd driver. That said I think the other
functions should get the same fix.
Best regards
Uwe
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>
> This is the minimal solution to this problem. It would be more
> consistent though not required to add a wm8350_ prefix to the
> other functions in this file aswell. Let me know what you prefer.
>
> drivers/mfd/wm8350-gpio.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/wm8350-gpio.c b/drivers/mfd/wm8350-gpio.c
> index ebf99be..d584f6b 100644
> --- a/drivers/mfd/wm8350-gpio.c
> +++ b/drivers/mfd/wm8350-gpio.c
> @@ -37,7 +37,7 @@ static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir)
> return ret;
> }
>
> -static int gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db)
> +static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db)
> {
> if (db == WM8350_GPIO_DEBOUNCE_ON)
> return wm8350_set_bits(wm8350, WM8350_GPIO_DEBOUNCE,
> @@ -210,7 +210,7 @@ int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func,
> goto err;
> if (gpio_set_polarity(wm8350, gpio, pol))
> goto err;
> - if (gpio_set_debounce(wm8350, gpio, debounce))
> + if (wm8350_gpio_set_debounce(wm8350, gpio, debounce))
> goto err;
> if (gpio_set_dir(wm8350, gpio, dir))
> goto err;
> --
> 1.7.5.4
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
>
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] mfd wm8350: rename static gpio_set_debounce()
@ 2011-08-15 6:34 ` Uwe Kleine-König
0 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2011-08-15 6:34 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
[extended the audience a bit]
On Wed, Aug 10, 2011 at 10:05:49AM +0200, Sascha Hauer wrote:
>
> The kernel already has a function with this name declared
> in asm-generic/gpio.h. So if this header leaks into wm8350/gpio.c
> we get
note the "if" is real on arm/imx since
14305e6 (ARM: mxc: use ARCH_NR_GPIOS to define gpio number)
That commit adds an #include <asm-generic/gpio.h> to
arch/arm/plat-mxc/include/mach/irqs.h and so you get the gpio stuff when
#including <linux/interrupt.h> (via linux/interrupt.h -> linux/irqnr.h
-> asm/irq.h -> mach/irqs.h).
I think this is a bit unfortunate, but I havn't looked if it could be
prevented somehow.
> drivers/mfd/wm8350-gpio.c:40:12: error: conflicting types for 'gpio_set_debounce'
> include/asm-generic/gpio.h:156:12: note: previous declaration of 'gpio_set_debounce' was here
>
> Fix this by adding a wm8350_ prefix to the function.
Nevertheless Sascha's patch is OK as gpio_set_debounce is a too generic
name for a function in an mfd driver. That said I think the other
functions should get the same fix.
Best regards
Uwe
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>
> This is the minimal solution to this problem. It would be more
> consistent though not required to add a wm8350_ prefix to the
> other functions in this file aswell. Let me know what you prefer.
>
> drivers/mfd/wm8350-gpio.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/wm8350-gpio.c b/drivers/mfd/wm8350-gpio.c
> index ebf99be..d584f6b 100644
> --- a/drivers/mfd/wm8350-gpio.c
> +++ b/drivers/mfd/wm8350-gpio.c
> @@ -37,7 +37,7 @@ static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir)
> return ret;
> }
>
> -static int gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db)
> +static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db)
> {
> if (db == WM8350_GPIO_DEBOUNCE_ON)
> return wm8350_set_bits(wm8350, WM8350_GPIO_DEBOUNCE,
> @@ -210,7 +210,7 @@ int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func,
> goto err;
> if (gpio_set_polarity(wm8350, gpio, pol))
> goto err;
> - if (gpio_set_debounce(wm8350, gpio, debounce))
> + if (wm8350_gpio_set_debounce(wm8350, gpio, debounce))
> goto err;
> if (gpio_set_dir(wm8350, gpio, dir))
> goto err;
> --
> 1.7.5.4
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
>
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mfd wm8350: rename static gpio_set_debounce()
2011-08-10 8:05 [PATCH] mfd wm8350: rename static gpio_set_debounce() Sascha Hauer
2011-08-10 10:41 ` Mark Brown
2011-08-15 6:34 ` Uwe Kleine-König
@ 2011-08-19 9:53 ` Uwe Kleine-König
2011-08-19 21:58 ` Mark Brown
2011-08-22 10:13 ` Samuel Ortiz
3 siblings, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2011-08-19 9:53 UTC (permalink / raw)
To: Sascha Hauer, Samuel Ortiz
Cc: linux-kernel, Mark Brown, Liam Girdwood, Robert Schwebel
Hi Samuel,
On Wed, Aug 10, 2011 at 10:05:49AM +0200, Sascha Hauer wrote:
>
> The kernel already has a function with this name declared
> in asm-generic/gpio.h. So if this header leaks into wm8350/gpio.c
> we get
>
> drivers/mfd/wm8350-gpio.c:40:12: error: conflicting types for 'gpio_set_debounce'
> include/asm-generic/gpio.h:156:12: note: previous declaration of 'gpio_set_debounce' was here
>
> Fix this by adding a wm8350_ prefix to the function.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>
> This is the minimal solution to this problem. It would be more
> consistent though not required to add a wm8350_ prefix to the
> other functions in this file aswell. Let me know what you prefer.
>
> drivers/mfd/wm8350-gpio.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/wm8350-gpio.c b/drivers/mfd/wm8350-gpio.c
> index ebf99be..d584f6b 100644
> --- a/drivers/mfd/wm8350-gpio.c
> +++ b/drivers/mfd/wm8350-gpio.c
> @@ -37,7 +37,7 @@ static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir)
> return ret;
> }
>
> -static int gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db)
> +static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db)
> {
> if (db == WM8350_GPIO_DEBOUNCE_ON)
> return wm8350_set_bits(wm8350, WM8350_GPIO_DEBOUNCE,
> @@ -210,7 +210,7 @@ int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func,
> goto err;
> if (gpio_set_polarity(wm8350, gpio, pol))
> goto err;
> - if (gpio_set_debounce(wm8350, gpio, debounce))
> + if (wm8350_gpio_set_debounce(wm8350, gpio, debounce))
> goto err;
> if (gpio_set_dir(wm8350, gpio, dir))
> goto err;
Can you please apply this patch? Even though it works around something
ugly (IMHO), it fixes a build failure on arm/imx. (Not on a vanilla
defconfig though.)
the following happens on next-20110819 and Linus' master:
...
CC drivers/mfd/wm8350-gpio.o
/home/ukleinek/gsrc/linux-2.6/drivers/mfd/wm8350-gpio.c:40:12: error: conflicting types for 'gpio_set_debounce'
/home/ukleinek/gsrc/linux-2.6/include/asm-generic/gpio.h:156:12: note: previous declaration of 'gpio_set_debounce' was here
make[3]: *** [drivers/mfd/wm8350-gpio.o] Error 1
make[2]: *** [drivers/mfd/wm8350-gpio.o] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
Best regards,
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mfd wm8350: rename static gpio_set_debounce()
2011-08-19 9:53 ` Uwe Kleine-König
@ 2011-08-19 21:58 ` Mark Brown
2011-08-19 23:47 ` Samuel Ortiz
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2011-08-19 21:58 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Sascha Hauer, Samuel Ortiz, linux-kernel, Liam Girdwood, Robert Schwebel
On Fri, Aug 19, 2011 at 11:53:26AM +0200, Uwe Kleine-König wrote:
> Can you please apply this patch? Even though it works around something
> ugly (IMHO), it fixes a build failure on arm/imx. (Not on a vanilla
> defconfig though.)
Samuel generally only applies patches about once a month or so.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mfd wm8350: rename static gpio_set_debounce()
2011-08-19 21:58 ` Mark Brown
@ 2011-08-19 23:47 ` Samuel Ortiz
0 siblings, 0 replies; 9+ messages in thread
From: Samuel Ortiz @ 2011-08-19 23:47 UTC (permalink / raw)
To: Mark Brown
Cc: Uwe Kleine-König, Sascha Hauer, linux-kernel, Liam Girdwood,
Robert Schwebel
On Fri, Aug 19, 2011 at 10:58:19PM +0100, Mark Brown wrote:
> On Fri, Aug 19, 2011 at 11:53:26AM +0200, Uwe Kleine-König wrote:
>
> > Can you please apply this patch? Even though it works around something
> > ugly (IMHO), it fixes a build failure on arm/imx. (Not on a vanilla
> > defconfig though.)
>
> Samuel generally only applies patches about once a month or so.
Actually once every 2 weeks, usually :) I will be catching up with my mfd
patches backlog this weekend.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mfd wm8350: rename static gpio_set_debounce()
2011-08-10 8:05 [PATCH] mfd wm8350: rename static gpio_set_debounce() Sascha Hauer
` (2 preceding siblings ...)
2011-08-19 9:53 ` Uwe Kleine-König
@ 2011-08-22 10:13 ` Samuel Ortiz
2011-09-17 8:57 ` Robert Schwebel
3 siblings, 1 reply; 9+ messages in thread
From: Samuel Ortiz @ 2011-08-22 10:13 UTC (permalink / raw)
To: Sascha Hauer; +Cc: linux-kernel, Mark Brown, Liam Girdwood, Robert Schwebel
Hi Sascha,
On Wed, Aug 10, 2011 at 10:05:49AM +0200, Sascha Hauer wrote:
>
> The kernel already has a function with this name declared
> in asm-generic/gpio.h. So if this header leaks into wm8350/gpio.c
> we get
>
> drivers/mfd/wm8350-gpio.c:40:12: error: conflicting types for 'gpio_set_debounce'
> include/asm-generic/gpio.h:156:12: note: previous declaration of 'gpio_set_debounce' was here
>
> Fix this by adding a wm8350_ prefix to the function.
Thanks for the fix, I applied this patch to both of my branches.
I'll send a pull request for the MFD fixes soon.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] mfd wm8350: rename static gpio_set_debounce()
2011-08-22 10:13 ` Samuel Ortiz
@ 2011-09-17 8:57 ` Robert Schwebel
0 siblings, 0 replies; 9+ messages in thread
From: Robert Schwebel @ 2011-09-17 8:57 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: Sascha Hauer, linux-kernel, Mark Brown, Liam Girdwood
Hi Samuel,
On Mon, Aug 22, 2011 at 12:13:30PM +0200, Samuel Ortiz wrote:
> On Wed, Aug 10, 2011 at 10:05:49AM +0200, Sascha Hauer wrote:
> >
> > The kernel already has a function with this name declared
> > in asm-generic/gpio.h. So if this header leaks into wm8350/gpio.c
> > we get
> >
> > drivers/mfd/wm8350-gpio.c:40:12: error: conflicting types for 'gpio_set_debounce'
> > include/asm-generic/gpio.h:156:12: note: previous declaration of 'gpio_set_debounce' was here
> >
> > Fix this by adding a wm8350_ prefix to the function.
> Thanks for the fix, I applied this patch to both of my branches.
> I'll send a pull request for the MFD fixes soon.
Ping... could you try to move this forward?
The kernel doesn't compile for mx3_defconfig since more than 6 weeks now
because of this patch :-(
rsc
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-09-17 8:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-10 8:05 [PATCH] mfd wm8350: rename static gpio_set_debounce() Sascha Hauer
2011-08-10 10:41 ` Mark Brown
2011-08-15 6:34 ` Uwe Kleine-König
2011-08-15 6:34 ` Uwe Kleine-König
2011-08-19 9:53 ` Uwe Kleine-König
2011-08-19 21:58 ` Mark Brown
2011-08-19 23:47 ` Samuel Ortiz
2011-08-22 10:13 ` Samuel Ortiz
2011-09-17 8:57 ` Robert Schwebel
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.