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, 17 Sep 2019 14:42:11 +0200
From:   Pavel Machek <pavel@....cz>
To:     Jacek Anaszewski <jacek.anaszewski@...il.com>
Cc:     Tony Lindgren <tony@...mide.com>,
        kernel list <linux-kernel@...r.kernel.org>, sre@...nel.org,
        nekit1000@...il.com, mpartap@....net, merlijn@...zup.org,
        Dan Murphy <dmurphy@...com>, linux-leds@...r.kernel.org
Subject: Re: [FYI] lm3532: right registration to work with LED-backlight

Hi!

> >>> +++ b/drivers/leds/leds-lm3532.c
> >>> @@ -629,7 +629,7 @@ static int lm3532_parse_node(struct lm3532_data *priv)
> >>>  
> >>>  		lm3532_init_registers(led);
> >>>  
> >>> -		ret = devm_led_classdev_register(priv->dev, &led->led_dev);
> >>> +		ret = devm_of_led_classdev_register(priv->dev, to_of_node(child), &led->led_dev);
> >>
> >> We no longer have devm_of_led_classdev_register(). You must use
> >> devm_led_classdev_register_ext().
> > 
> > Something like this (untested)?

> If you want to properly switch to the new extended LED registration
> API, then you need:
> 
> .default_label = ":",
> .devicename = led->client->name;
> 
> and in addition to that you need to remove old way of composing
> the LED name. Something like patch [0] for leds-lm3692x.c.
> And also patch for DT for consistency would be needed (like [1]).
> 
> However it will not change anything in LED naming in comparison
> to the existing code, except that it will enable the possibility
> of using 'function' and 'color' DT properties instead of deprecated
> 'label'.
> 
> I suppose that you expected some extra bonus by passing
> DT node, but I'm not sure what exactly. Possibly you confused
> this with the patch set [2] that allows for instantiating
> backlight device on top of LED class device (it has been forgotten
> btw and will miss 5.4).

Yes, it is for LED backlight. Thanks for hints, you have corrected
version in your inbox.

Best regards,
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ