diff options
author | Chen Gang <gang.chen.5i5j@gmail.com> | 2013-12-09 08:41:37 +0400 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2014-01-28 05:28:49 +0400 |
commit | 33ca15325ff371be7f20be7534f5aa5b6a00b558 (patch) | |
tree | ee06a700ebf1641c9ab4d8cee380b16bcf7c78c1 /drivers/leds/leds-tca6507.c | |
parent | 93ad8a1d59a35ef7b489a83552daee6506f47815 (diff) | |
download | linux-33ca15325ff371be7f20be7534f5aa5b6a00b558.tar.xz |
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>
Diffstat (limited to 'drivers/leds/leds-tca6507.c')
-rw-r--r-- | drivers/leds/leds-tca6507.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c index 503df834c690..3d9e267a56c4 100644 --- a/drivers/leds/leds-tca6507.c +++ b/drivers/leds/leds-tca6507.c @@ -728,8 +728,9 @@ tca6507_led_dt_init(struct i2c_client *client) pdata->leds.leds = tca_leds; pdata->leds.num_leds = NUM_LEDS; +#ifdef CONFIG_GPIOLIB pdata->gpio_base = -1; - +#endif return pdata; } |