提交 e556756a 编写于 作者: L Linus Walleij 提交者: Wolfram Sang

i2c: mux: pca954x: fix dependencies

This driver causes the following randconfig build error:

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

This is because it is getting compiled without gpiolib, so
introduce an explicit dependency.
Reported-by: NJim Davis <jim.epost@gmail.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 a497c3ba
...@@ -40,6 +40,7 @@ config I2C_MUX_PCA9541 ...@@ -40,6 +40,7 @@ config I2C_MUX_PCA9541
config I2C_MUX_PCA954x config I2C_MUX_PCA954x
tristate "Philips PCA954x I2C Mux/switches" tristate "Philips PCA954x I2C Mux/switches"
depends on GPIOLIB
help help
If you say yes here you get support for the Philips PCA954x If you say yes here you get support for the Philips PCA954x
I2C mux/switch devices. I2C mux/switch devices.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册