From: Olof Johansson <olof@lixom.net>
To: cooloney@gmail.com
Cc: rpurdie@rpsys.net, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org, Olof Johansson <olof@lixom.net>
Subject: [PATCH] leds: pwm: Remove a warning on non-DT platforms
Date: Wed, 11 Dec 2013 16:11:42 -0800 [thread overview]
Message-ID: <1386807102-15397-1-git-send-email-olof@lixom.net> (raw)
This removes a warning on non-DT-enabled platforms:
drivers/leds/leds-pwm.c: In function 'led_pwm_create_of':
drivers/leds/leds-pwm.c:88:22: warning: unused variable 'node'
Really caused by the local variable that is assigned to and then never
used. Just do away with the local var, it's not needed.
Technically this code path can never be entered without DT enabled,
since there's an earlier check about number of children in the calling
function, but the compiler can't see that.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
drivers/leds/leds-pwm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
index b31d8e99..bf49547 100644
--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -85,11 +85,10 @@ static inline size_t sizeof_pwm_leds_priv(int num_leds)
static int led_pwm_create_of(struct platform_device *pdev,
struct led_pwm_priv *priv)
{
- struct device_node *node = pdev->dev.of_node;
struct device_node *child;
int ret;
- for_each_child_of_node(node, child) {
+ for_each_child_of_node(pdev->dev.of_node, child) {
struct led_pwm_data *led_dat = &priv->leds[priv->num_leds];
led_dat->cdev.name = of_get_property(child, "label",
--
1.7.10.4
next reply other threads:[~2013-12-12 0:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 0:11 Olof Johansson [this message]
2013-12-12 17:35 ` Bryan Wu
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=1386807102-15397-1-git-send-email-olof@lixom.net \
--to=olof@lixom.net \
--cc=cooloney@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®