lkml.org 
[lkml]   [2020]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-09-09 11:08    [W:0.059 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site