Re: [PATCH v1 2/3] leds: lm36274: Switch to use fwnode_property_count_uXX()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andy

On 7/23/19 3:14 PM, Andy Shevchenko wrote:
Use fwnode_property_count_uXX() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Thanks for the update

Acked-by: Dan Murphy <dmurphy@xxxxxx>


---
  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;



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux