media: solo6x10: hide unused variable
authorArnd Bergmann <arnd@arndb.de>
Fri, 15 Sep 2017 19:52:04 +0000 (15:52 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Dec 2017 15:04:57 +0000 (10:04 -0500)
When building without CONFIG_GPIOLIB, we get a harmless
warning about an unused variable:

drivers/media/pci/solo6x10/solo6x10-gpio.c: In function 'solo_gpio_init':
drivers/media/pci/solo6x10/solo6x10-gpio.c:165:6: error: unused variable 'ret' [-Werror=unused-variable]

This adds another #ifdef around the declaration.

Fixes: d3202d1981dc ("media: solo6x10: export hardware GPIO pins 8:31 to gpiolib interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Acked-by: Anton Sviridenko <anton@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/solo6x10/solo6x10-gpio.c

index 3d0d1aa2f6a802d7fa46d5f65704665e0cfc68bb..7b4641a2cb84b67e55ad5dbe6fefd05f138f2c69 100644 (file)
@@ -162,7 +162,9 @@ static void solo_gpiochip_set(struct gpio_chip *chip,
 
 int solo_gpio_init(struct solo_dev *solo_dev)
 {
+#ifdef CONFIG_GPIOLIB
        int ret;
+#endif
 
        solo_gpio_config(solo_dev);
 #ifdef CONFIG_GPIOLIB