Re: [PATCH v1 1/3] leds: lm3532: Switch to use fwnode_property_count_uXX()

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

 



Hi Andy,

Thank you for the patch set.

Patches 1-3 applied.

On 7/23/19 10:14 PM, Andy Shevchenko wrote:
> Use fwnode_property_count_uXX() directly, that makes code neater.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/leds/leds-lm3532.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c
> index 180895b83b88..646100724971 100644
> --- a/drivers/leds/leds-lm3532.c
> +++ b/drivers/leds/leds-lm3532.c
> @@ -549,10 +549,7 @@ static int lm3532_parse_node(struct lm3532_data *priv)
>  				lm3532_als_configure(priv, led);
>  		}
>  
> -		led->num_leds = fwnode_property_read_u32_array(child,
> -							       "led-sources",
> -							       NULL, 0);
> -
> +		led->num_leds = fwnode_property_count_u32(child, "led-sources");
>  		if (led->num_leds > LM3532_MAX_LED_STRINGS) {
>  			dev_err(&priv->client->dev, "To many LED string defined\n");
>  			continue;
> 

-- 
Best regards,
Jacek Anaszewski



[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