From: Chen Gang <gang.chen.5i5j@gmail.com>
To: cooloney@gmail.com, rpurdie@rpsys.net
Cc: linux-leds@vger.kernel.org, James Hogan <james.hogan@imgtec.com>
Subject: [PATCH] drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base'
Date: Mon, 09 Dec 2013 12:41:37 +0800 [thread overview]
Message-ID: <52A54A01.60107@gmail.com> (raw)
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
next reply other threads:[~2013-12-09 4:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 4:41 Chen Gang [this message]
2013-12-09 18:24 ` [PATCH] drivers: leds: leds-tca6507: check CONFIG_GPIOLIB whether defined for 'gpio_base' Bryan Wu
2013-12-10 1:58 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52A54A01.60107@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=cooloney@gmail.com \
--cc=james.hogan@imgtec.com \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).