lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 20/26] leds: aat1290: Use generic support for composing LED names
From
Date
On 4/24/19 3:57 PM, Pavel Machek wrote:
> Hi!
>
>> Switch to using generic LED support for composing LED class
>> device name.
>>
>> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
>
>> @@ -257,9 +257,6 @@ static int aat1290_led_parse_dt(struct aat1290_led *led,
>> return -EINVAL;
>> }
>>
>> - led_cdev->name = of_get_property(child_node, "label", NULL) ? :
>> - child_node->name;
>> -
>> ret = of_property_read_u32(child_node, "led-max-microamp",
>> &cfg->max_mm_current);
>> /*
>> @@ -469,6 +466,7 @@ static int aat1290_led_probe(struct platform_device *pdev)
>> struct aat1290_led *led;
>> struct led_classdev *led_cdev;
>> struct led_classdev_flash *fled_cdev;
>> + struct led_init_data init_data = {};
>
> You can do directly = { .devicename = ...; }, at least for the name.

In previous versions I applied similar approach in few places but
later figured out it will be more consistent if all assignments are
next to each other.

> Anyway, that's a detail.
>
> 8, 10, 12, 14, 16, 18, 20: Acked-by: Pavel Machek <pavel@ucw.cz>

Thanks!

--
Best regards,
Jacek Anaszewski

\
 
 \ /
  Last update: 2019-04-24 20:19    [W:0.155 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site