Skip to content

Commit

Permalink
drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for…
Browse files Browse the repository at this point in the history
… '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 <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
  • Loading branch information
Chen-Gang authored and cooloney committed Jan 28, 2014
1 parent 93ad8a1 commit 33ca153
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/leds/leds-tca6507.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 33ca153

Please sign in to comment.