leds: ns2: use struct led_init_data when registering
authorMarek Behún <marek.behun@nic.cz>
Thu, 17 Sep 2020 22:33:37 +0000 (00:33 +0200)
committerPavel Machek <pavel@ucw.cz>
Sat, 26 Sep 2020 19:56:42 +0000 (21:56 +0200)
commitf847ef543ce45c917bcbcafb2555aa9e5968c385
tree41c8f48a3fff247fe03e1b8a687d057947e4af84
parent48b77cdca50a180fd1f22f4ae3b3d1e4ec7d2e5c
leds: ns2: use struct led_init_data when registering

By using struct led_init_data when registering we do not need to parse
`label` DT property. Moreover `label` is deprecated and if it is not
present but `color` and `function` are, LED core will compose a name
from these properties instead.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Simon Guinot <sguinot@lacie.com>
Cc: Vincent Donnefort <vdonnefort@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-ns2.c