From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org, Dan Murphy <dmurphy@ti.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/3] leds: lm36274: Switch to use fwnode_property_count_uXX()
Date: Tue, 23 Jul 2019 23:14:58 +0300 [thread overview]
Message-ID: <20190723201459.70449-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20190723201459.70449-1-andriy.shevchenko@linux.intel.com>
Use fwnode_property_count_uXX() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/leds/leds-lm36274.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/leds/leds-lm36274.c b/drivers/leds/leds-lm36274.c
index ed9dc857ec8f..836b60c9a2b8 100644
--- a/drivers/leds/leds-lm36274.c
+++ b/drivers/leds/leds-lm36274.c
@@ -90,9 +90,7 @@ static int lm36274_parse_dt(struct lm36274 *lm36274_data)
snprintf(label, sizeof(label),
"%s:%s", lm36274_data->pdev->name, name);
- lm36274_data->num_leds = fwnode_property_read_u32_array(child,
- "led-sources",
- NULL, 0);
+ lm36274_data->num_leds = fwnode_property_count_u32(child, "led-sources");
if (lm36274_data->num_leds <= 0)
return -ENODEV;
--
2.20.1
next prev parent reply other threads:[~2019-07-23 20:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 20:14 [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX() Andy Shevchenko
2019-07-23 20:14 ` Andy Shevchenko [this message]
2019-07-24 15:19 ` [PATCH v1 2/3] leds: lm36274: " Dan Murphy
2019-07-23 20:14 ` [PATCH v1 3/3] leds: lm3697: " Andy Shevchenko
2019-07-24 15:20 ` Dan Murphy
2019-07-24 15:19 ` [PATCH v1 1/3] leds: lm3532: " Dan Murphy
2019-07-24 21:03 ` Jacek Anaszewski
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=20190723201459.70449-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.