Skip to contentSkip to conversation

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

PATCH In review Chen Gang 2 participants 3 messages Dec 9, 2013 – Dec 10, 2013 LED

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

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
index 503df83..3d9e267 100644
@@ -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
#1 lore raw
Quoted 5 lines · Chen Gang

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

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: 'struct tca6507_platform_data' has no member named 'gpio_base'

Good, I merged it into my tree.
Thanks,
-Bryan

Quoted 23 lines
---
 drivers/leds/leds-tca6507.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/leds/leds-tca6507.c +2 -2
index 503df83..3d9e267 100644
@@ -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

author
#2 lore raw
Quoted 14 lines · Bryan Wu
Quoted 5 lines · Chen Gang

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

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: 'struct tca6507_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