lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 26/26] leds: an30259a: Use generic support for composing LED names
On Wed 2019-04-17 22:54:39, Jacek Anaszewski wrote:
> Switch to using generic LED support for composing LED class
> device name.
>
> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Cc: Simon Shields <simon@lineageos.org>

> @@ -312,13 +306,20 @@ static int an30259a_probe(struct i2c_client *client)
> chip->regmap = devm_regmap_init_i2c(client, &an30259a_regmap_config);
>
> for (i = 0; i < chip->num_leds; i++) {
> + struct led_init_data init_data;
> +
> an30259a_init_default_state(&chip->leds[i]);
> chip->leds[i].cdev.brightness_set_blocking =
> an30259a_brightness_set;
> chip->leds[i].cdev.blink_set = an30259a_blink_set;
>
> - err = devm_led_classdev_register(&client->dev,
> - &chip->leds[i].cdev);
> + init_data.fwnode = chip->leds[i].fwnode;
> + init_data.devicename = AN30259A_NAME;
> + init_data.default_label = ":";
> +
> + err = devm_led_classdev_register_ext(&client->dev,
> + &chip->leds[i].cdev,
> + &init_data);
> if (err < 0)
> goto exit;
> }

Again, uninitialized field in init_data... AFAICT.

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: 2019-04-24 16:05    [W:0.285 / U:1.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site