Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'

Need check CONFIG_GPIOLIB whether defined, just like another area has
done within this file. Or can not pass compiling when CONFIG_GPIOLIB
disabled.

The related error (with allmodconfig for metag):

CC [M] drivers/leds/leds-tca6507.o
drivers/leds/leds-tca6507.c: In function 'tca6507_led_dt_init':
drivers/leds/leds-tca6507.c:731: error: 'struct tca6507_platform_data' has no member named 'gpio_base'

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>

authored by

Chen Gang and committed by
Bryan Wu
33ca1532 93ad8a1d

+2 -1
+2 -1
drivers/leds/leds-tca6507.c
··· 728 728 729 729 pdata->leds.leds = tca_leds; 730 730 pdata->leds.num_leds = NUM_LEDS; 731 + #ifdef CONFIG_GPIOLIB 731 732 pdata->gpio_base = -1; 732 - 733 + #endif 733 734 return pdata; 734 735 } 735 736