lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Sep 2019 22:08:26 +0200
From:   Jacek Anaszewski <jacek.anaszewski@...il.com>
To:     Jean-Jacques Hiblot <jjhiblot@...com>, pavel@....cz, dmurphy@...com
Cc:     tomi.valkeinen@...com, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RESEND,v2 2/2] leds: tlc591xx: Use the OF version of the LED
 registration function

Hi Jean,

Thank you the patch.

On 9/10/19 3:38 PM, Jean-Jacques Hiblot wrote:
> The driver parses the device-tree to identify which LED should be handled.
> Since the information about the device node is known at this time, we can
> provide the LED core with it. It may be useful later.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@...com>
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@...com>
> Acked-by: Pavel Machek <pavel@....cz>
> ---
>  drivers/leds/leds-tlc591xx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
> index 3d5a4b92f016..10764a62cb71 100644
> --- a/drivers/leds/leds-tlc591xx.c
> +++ b/drivers/leds/leds-tlc591xx.c
> @@ -207,7 +207,7 @@ tlc591xx_probe(struct i2c_client *client,
>  		led->led_no = reg;
>  		led->ldev.brightness_set_blocking = tlc591xx_brightness_set;
>  		led->ldev.max_brightness = LED_FULL;
> -		err = devm_led_classdev_register(dev, &led->ldev);
> +		err = devm_of_led_classdev_register(dev, child, &led->ldev);

devm_of_led_classdev_register() has been replaced with
devm_led_classdev_register_ext() recently. Do you have some specific
reason for passing OF node to the LED registration function?

Currently this is beneficial only for generic LED name composition
mechanism basing on 'function' and 'color' DT properties so if you
want you can convert the driver to that. Please compare such recent
conversions in linux-leds.git for-next branch [0][1].

>  		if (err < 0) {
>  			dev_err(dev, "couldn't register LED %s\n",
>  				led->ldev.name);
> 

[0]
https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=a50ff28348934913c46feb7945571329e46c70b3
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=4dcbc8f8c59f4b618d651f5ba884ee5bf562c8de

-- 
Best regards,
Jacek Anaszewski

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ