linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'
@ 2013-12-09  4:41 Chen Gang
  2013-12-09 18:24 ` Bryan Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-12-09  4:41 UTC (permalink / raw)
  To: cooloney, rpurdie; +Cc: linux-leds, James Hogan

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>
---
 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 503df83..3d9e267 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;
 }
 
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-10  1:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09  4:41 [PATCH] drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base' Chen Gang
2013-12-09 18:24 ` Bryan Wu
2013-12-10  1:58   ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).