drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'
PATCH 1/1 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'
--- drivers/leds/leds-tca6507.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/leds/leds-tca6507.c +2 -1
@@ -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; }
Signature · 1 line
1.7.7.6
Quoted 5 lines · Chen Gang
Need check
CONFIG_GPIOLIBwhether defined, just like another area has done within this file. Or can not pass compiling whenCONFIG_GPIOLIBdisabled.
Quoted 7 lines
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: 'structtca6507_platform_data' has no member named 'gpio_base'
Good, I merged it into my tree.
Thanks,
-Bryan
Quoted 23 lines
Signed-off-by Chen Gang <[email protected]>--- drivers/leds/leds-tca6507.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/leds/leds-tca6507.c +2
-2@@ -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; } --1.7.7.6
Quoted 14 lines · Bryan Wu
Quoted 5 lines · Chen Gang
Need check
CONFIG_GPIOLIBwhether defined, just like another area has done within this file. Or can not pass compiling whenCONFIG_GPIOLIBdisabled.Quoted 7 lines
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: 'structtca6507_platform_data' has no member named 'gpio_base'
Quoted 4 lines
Good, I merged it into my tree.
Thanks,
-Bryan
Thank you too.
Signature · 3 lines
Chen Gang Open, share, and attitude like air, water and life which God blessed