[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 9 Sep 2020 11:07:36 +0200
From: Pavel Machek <pavel@....cz>
To: Alexander Dahl <post@...pocky.de>
Cc: linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Dan Murphy <dmurphy@...com>, Rob Herring <robh+dt@...nel.org>,
linux-kernel@...r.kernel.org, Alexander Dahl <ada@...rsis.com>
Subject: Re: [PATCH v3 1/2] leds: pwm: Allow automatic labels for DT based
devices
Hi!
> pwm_init_state(led_data->pwm, &led_data->pwmstate);
>
> - ret = devm_led_classdev_register(dev, &led_data->cdev);
> + if (fwnode) {
> + init_data.fwnode = fwnode;
> + ret = devm_led_classdev_register_ext(dev, &led_data->cdev,
> + &init_data);
> + } else {
> + ret = devm_led_classdev_register(dev, &led_data->cdev);
> + }
Can you always use _ext version, even with null fwnode? If not, can
you fix the core to accept that? Having that conditional in driver is
ugly.
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