diff mbox

[v2] media: rc: fix gpio-ir-receiver build failure

Message ID 20171005121105.zdldrc323lpp2upn@lenoch (mailing list archive)
State New, archived
Headers show

Commit Message

Ladislav Michl Oct. 5, 2017, 12:11 p.m. UTC
The 0-day robot reports:

   drivers/media/rc/gpio-ir-recv.c: In function 'gpio_ir_recv_irq':
>> drivers/media/rc/gpio-ir-recv.c:38:8: error: implicit declaration of function 'gpiod_get_value' [-Werror=implicit-function-declaration]

Fixes: eed008e605d1 ("[media] media: rc: gpio-ir-recv: use gpiolib API")

For some reason only partial patch was applied. Also include
gpio/consumer.h otherwise compile test fails.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 Changes:
 -v2: replace Sean's patch with something I believe is more accurate

 drivers/media/rc/Kconfig        |    1 +
 drivers/media/rc/gpio-ir-recv.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Sean Young Oct. 5, 2017, 12:40 p.m. UTC | #1
On Thu, Oct 05, 2017 at 02:11:06PM +0200, Ladislav Michl wrote:
> The 0-day robot reports:
> 
>    drivers/media/rc/gpio-ir-recv.c: In function 'gpio_ir_recv_irq':
> >> drivers/media/rc/gpio-ir-recv.c:38:8: error: implicit declaration of function 'gpiod_get_value' [-Werror=implicit-function-declaration]
> 
> Fixes: eed008e605d1 ("[media] media: rc: gpio-ir-recv: use gpiolib API")
> 
> For some reason only partial patch was applied. Also include
> gpio/consumer.h otherwise compile test fails.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>  Changes:
>  -v2: replace Sean's patch with something I believe is more accurate

Yes, your change is right. Thanks for pointing that out. Actually there
are more device tree rc drivers that need a "depends on OF || TEST_COMPILE".

Acked-by: Sean Young <sean@mess.org>

> 
>  drivers/media/rc/Kconfig        |    1 +
>  drivers/media/rc/gpio-ir-recv.c |    2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
> index d9ce8ff55d0c..6bfe983ff295 100644
> --- a/drivers/media/rc/Kconfig
> +++ b/drivers/media/rc/Kconfig
> @@ -393,6 +393,7 @@ config RC_LOOPBACK
>  config IR_GPIO_CIR
>  	tristate "GPIO IR remote control"
>  	depends on RC_CORE
> +	depends on (OF && GPIOLIB) || COMPILE_TEST
>  	---help---
>  	   Say Y if you want to use GPIO based IR Receiver.
> 
> diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
> index 5bb0851eacce..b6c4a2d2b696 100644
> --- a/drivers/media/rc/gpio-ir-recv.c
> +++ b/drivers/media/rc/gpio-ir-recv.c
> @@ -14,7 +14,7 @@
>  #include <linux/init.h>
>  #include <linux/module.h>
>  #include <linux/interrupt.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/slab.h>
>  #include <linux/of.h>
>  #include <linux/of_gpio.h>
diff mbox

Patch

diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
index d9ce8ff55d0c..6bfe983ff295 100644
--- a/drivers/media/rc/Kconfig
+++ b/drivers/media/rc/Kconfig
@@ -393,6 +393,7 @@  config RC_LOOPBACK
 config IR_GPIO_CIR
 	tristate "GPIO IR remote control"
 	depends on RC_CORE
+	depends on (OF && GPIOLIB) || COMPILE_TEST
 	---help---
 	   Say Y if you want to use GPIO based IR Receiver.

diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index 5bb0851eacce..b6c4a2d2b696 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -14,7 +14,7 @@ 
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/of_gpio.h>