From: Jingoo Han <jg1.han@samsung.com>
To: 'Laurent Pinchart' <laurent.pinchart@ideasonboard.com>,
linux-i2c@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
wsa@the-dreams.de, khali@linux-fr.org, linus.walleij@linaro.org,
paul.gortmaker@windriver.com,
'Stephen Rothwell' <sfr@canb.auug.org.au>,
'Jim Davis' <jim.epost@gmail.com>,
'Jingoo Han' <jg1.han@samsung.com>
Subject: Re: [PATCH] i2c: pca954x: Fix compilation without CONFIG_GPIOLIB
Date: Thu, 05 Jun 2014 10:57:41 +0900 [thread overview]
Message-ID: <007001cf8061$89337e30$9b9a7a90$%han@samsung.com> (raw)
In-Reply-To: <1401900992-16581-1-git-send-email-laurent.pinchart@ideasonboard.com>
On Thursday, June 05, 2014 1:57 AM, Laurent Pinchart write/l
>
> The pca954x driver recently switched to the GPIO descriptor API without
> including the correct <linux/gpio/consumer.h> header. This breaks
> compilation without CONFIG_GPIOLIB.
>
> drivers/i2c/muxes/i2c-mux-pca954x.c: In function ‘pca954x_probe’:
> drivers/i2c/muxes/i2c-mux-pca954x.c:204:2: error: implicit declaration
> of function ‘devm_gpiod_get’ [-Werror=implicit-function-declaration]
> gpio = devm_gpiod_get(&client->dev, "reset");
> ^
> drivers/i2c/muxes/i2c-mux-pca954x.c:204:7: warning: assignment makes
> pointer from integer without a cast [enabled by default]
> gpio = devm_gpiod_get(&client->dev, "reset");
> ^
> drivers/i2c/muxes/i2c-mux-pca954x.c:206:3: error: implicit declaration
> of function ‘gpiod_direction_output’
> [-Werror=implicit-function-declaration]
> gpiod_direction_output(gpio, 0);
> ^
> cc1: some warnings being treated as errors
> make[3]: *** [drivers/i2c/muxes/i2c-mux-pca954x.o] Error 1
>
> Fix it by including the right header.
>
> Reported-by: Jim Davis <jim.epost@gmail.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Best regards,
Jingoo Han
> ---
> drivers/i2c/muxes/i2c-mux-pca954x.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
> index c2c443f..9bd4212 100644
> --- a/drivers/i2c/muxes/i2c-mux-pca954x.c
> +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
> @@ -36,12 +36,11 @@
> */
>
> #include <linux/device.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/i2c.h>
> #include <linux/i2c-mux.h>
> #include <linux/i2c/pca954x.h>
> #include <linux/module.h>
> -#include <linux/of_gpio.h>
> #include <linux/slab.h>
>
> #define PCA954X_MAX_NCHANS 8
> --
> Regards,
>
> Laurent Pinchart
next prev parent reply other threads:[~2014-06-05 1:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 16:44 randconfig build error with next-20140604, in drivers/i2c/muxes/i2c-mux-pca954x.c Jim Davis
2014-06-04 16:56 ` [PATCH] i2c: pca954x: Fix compilation without CONFIG_GPIOLIB Laurent Pinchart
2014-06-04 21:02 ` Jean Delvare
2014-06-05 1:57 ` Jingoo Han [this message]
[not found] ` <1401900992-16581-1-git-send-email-laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-06-05 13:11 ` Wolfram Sang
2014-06-09 13:12 ` randconfig build error with next-20140604, in drivers/i2c/muxes/i2c-mux-pca954x.c Linus Walleij
[not found] ` <CACRpkdZO_vE1VnJ6=gEdX8P-qNADsskJkMOdaRDg-TabTSySCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-09 13:31 ` Laurent Pinchart
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='007001cf8061$89337e30$9b9a7a90$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=jim.epost@gmail.com \
--cc=khali@linux-fr.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=sfr@canb.auug.org.au \
--cc=wsa@the-dreams.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).