All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: pca953x: make inclusion of <linux/of_platform.h> unconditional
@ 2015-12-09 10:06 Linus Walleij
  2015-12-09 10:53 ` Ben Dooks
  2015-12-11  9:05 ` Ben Dooks
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Walleij @ 2015-12-09 10:06 UTC (permalink / raw)
  To: linux-gpio, Alexandre Courbot; +Cc: Linus Walleij, Ben Dooks

After adding the DT matching in
commit 6f29c9afbe636fc0e35c82a11eaf45c3b85eb07a
"gpio: pca935x: fix of-only probed devices"
compilation fails like this:

CC [M]  drivers/gpio/gpio-pca953x.o
gpio-pca953x.c: In function ‘pca953x_probe’:
gpio-pca953x.c:693:11: error: implicit declaration of
function ‘of_match_device’ [-Werror=implicit-function-declaration]
match = of_match_device(pca953x_dt_ids, &client->dev);
        ^
gpio-pca953x.c:693:9: warning: assignment makes pointer from
integer without a cast [-Wint-conversion]
match = of_match_device(pca953x_dt_ids, &client->dev);
        ^
cc1: some warnings being treated as errors
../scripts/Makefile.build:264: recipe for target
'drivers/gpio/gpio-pca953x.o' failed

After removing the conditional inclusion guards compilation
works fine again. Might be a module problem so that
fix.

Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpio-pca953x.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 14729657a112..2eaf235a39e5 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -18,9 +18,7 @@
 #include <linux/i2c.h>
 #include <linux/platform_data/pca953x.h>
 #include <linux/slab.h>
-#ifdef CONFIG_OF_GPIO
 #include <linux/of_platform.h>
-#endif
 #include <linux/acpi.h>
 
 #define PCA953X_INPUT		0
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: pca953x: make inclusion of <linux/of_platform.h> unconditional
  2015-12-09 10:06 [PATCH] gpio: pca953x: make inclusion of <linux/of_platform.h> unconditional Linus Walleij
@ 2015-12-09 10:53 ` Ben Dooks
  2015-12-10 18:30   ` Linus Walleij
  2015-12-11  9:05 ` Ben Dooks
  1 sibling, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2015-12-09 10:53 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio, Alexandre Courbot

On 09/12/15 10:06, Linus Walleij wrote:
> After adding the DT matching in
> commit 6f29c9afbe636fc0e35c82a11eaf45c3b85eb07a
> "gpio: pca935x: fix of-only probed devices"
> compilation fails like this:
> 
> CC [M]  drivers/gpio/gpio-pca953x.o
> gpio-pca953x.c: In function ‘pca953x_probe’:
> gpio-pca953x.c:693:11: error: implicit declaration of
> function ‘of_match_device’ [-Werror=implicit-function-declaration]
> match = of_match_device(pca953x_dt_ids, &client->dev);

Thanks, given the driver makes no other attempt to remove OF
lists if there is no OF present then this may as well be
unconditionally included.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: pca953x: make inclusion of <linux/of_platform.h> unconditional
  2015-12-09 10:53 ` Ben Dooks
@ 2015-12-10 18:30   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-12-10 18:30 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-gpio@vger.kernel.org, Alexandre Courbot

On Wed, Dec 9, 2015 at 11:53 AM, Ben Dooks <ben.dooks@codethink.co.uk> wrote:
> On 09/12/15 10:06, Linus Walleij wrote:
>> After adding the DT matching in
>> commit 6f29c9afbe636fc0e35c82a11eaf45c3b85eb07a
>> "gpio: pca935x: fix of-only probed devices"
>> compilation fails like this:
>>
>> CC [M]  drivers/gpio/gpio-pca953x.o
>> gpio-pca953x.c: In function ‘pca953x_probe’:
>> gpio-pca953x.c:693:11: error: implicit declaration of
>> function ‘of_match_device’ [-Werror=implicit-function-declaration]
>> match = of_match_device(pca953x_dt_ids, &client->dev);
>
> Thanks, given the driver makes no other attempt to remove OF
> lists if there is no OF present then this may as well be
> unconditionally included.

Hm it seems to fail compilation on a few defconfigs still...
Need to think about adding deps or reintroducing these ifdefs.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: pca953x: make inclusion of <linux/of_platform.h> unconditional
  2015-12-09 10:06 [PATCH] gpio: pca953x: make inclusion of <linux/of_platform.h> unconditional Linus Walleij
  2015-12-09 10:53 ` Ben Dooks
@ 2015-12-11  9:05 ` Ben Dooks
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2015-12-11  9:05 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio, Alexandre Courbot

On 09/12/15 10:06, Linus Walleij wrote:
> After adding the DT matching in
> commit 6f29c9afbe636fc0e35c82a11eaf45c3b85eb07a
> "gpio: pca935x: fix of-only probed devices"
> compilation fails like this:
> 
> CC [M]  drivers/gpio/gpio-pca953x.o
> gpio-pca953x.c: In function ‘pca953x_probe’:
> gpio-pca953x.c:693:11: error: implicit declaration of
> function ‘of_match_device’ [-Werror=implicit-function-declaration]
> match = of_match_device(pca953x_dt_ids, &client->dev);
>         ^
> gpio-pca953x.c:693:9: warning: assignment makes pointer from
> integer without a cast [-Wint-conversion]
> match = of_match_device(pca953x_dt_ids, &client->dev);
>         ^
> cc1: some warnings being treated as errors
> ../scripts/Makefile.build:264: recipe for target
> 'drivers/gpio/gpio-pca953x.o' failed
> 
> After removing the conditional inclusion guards compilation
> works fine again. Might be a module problem so that
> fix.
> 
> Cc: Ben Dooks <ben.dooks@codethink.co.uk>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/gpio/gpio-pca953x.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index 14729657a112..2eaf235a39e5 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -18,9 +18,7 @@
>  #include <linux/i2c.h>
>  #include <linux/platform_data/pca953x.h>
>  #include <linux/slab.h>
> -#ifdef CONFIG_OF_GPIO
>  #include <linux/of_platform.h>
> -#endif
>  #include <linux/acpi.h>

I think you also need #include <linux/of_device.h>

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-11  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09 10:06 [PATCH] gpio: pca953x: make inclusion of <linux/of_platform.h> unconditional Linus Walleij
2015-12-09 10:53 ` Ben Dooks
2015-12-10 18:30   ` Linus Walleij
2015-12-11  9:05 ` Ben Dooks

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.