Skip to content

Commit d259f91

Browse files
arndbmchehab
authored andcommitted
media: solo6x10: hide unused variable
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: d3202d1 ("media: solo6x10: export hardware GPIO pins 8:31 to gpiolib interface") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Ismael Luceno <[email protected]> Acked-by: Anton Sviridenko <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 06ac35e commit d259f91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/media/pci/solo6x10/solo6x10-gpio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ static void solo_gpiochip_set(struct gpio_chip *chip,
162162

163163
int solo_gpio_init(struct solo_dev *solo_dev)
164164
{
165+
#ifdef CONFIG_GPIOLIB
165166
int ret;
167+
#endif
166168

167169
solo_gpio_config(solo_dev);
168170
#ifdef CONFIG_GPIOLIB

0 commit comments

Comments
 (0)