]> git.baikalelectronics.ru Git - kernel.git/commit
media: i2c: ov7740: use gpio/consumer.h instead of gpio.h
authorArnd Bergmann <arnd@arndb.de>
Thu, 18 Jan 2018 13:18:12 +0000 (08:18 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 23 Jan 2018 13:13:02 +0000 (08:13 -0500)
commitfdb6275ddfb22bda7c2824fabcb81e6b999283a0
tree4d1d572c513a9020cf2cddccc6f286b971874de5
parentdd162dd5ee0bf9a1bf58048ae3957637abe5eebf
media: i2c: ov7740: use gpio/consumer.h instead of gpio.h

When built on a platform without gpiolib support, we run into
a couple of compile errors in ov7740, including:

drivers/media/i2c/ov7740.c: In function 'ov7740_set_power':
drivers/media/i2c/ov7740.c:307:4: error: implicit declaration of function 'gpiod_direction_output'; did you mean 'gpio_direction_output'? [-Werror=implicit-function-declaration]
    gpiod_direction_output(ov7740->pwdn_gpio, 0);
drivers/media/i2c/ov7740.c:914:4: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function); did you mean 'GPIOF_INIT_HIGH'?

Changing it to use the correct header file solves the problem.

Fixes: ef347006d20f ("media: i2c: Add the ov7740 image sensor driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/ov7740.c