Re: [PATCH] i2c: pca954x: Fix compilation without CONFIG_GPIOLIB

From: Wolfram Sang
Date: Thu Jun 05 2014 - 09:11:41 EST


On Wed, Jun 04, 2014 at 06:56:32PM +0200, Laurent Pinchart wrote:
> 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@xxxxxxxxx>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

Applied to for-next, thanks!

Attachment: signature.asc
Description: Digital signature