leds: ns2: alloc simple array instead of struct ns2_led_priv
authorMarek Behún <marek.behun@nic.cz>
Thu, 17 Sep 2020 22:33:25 +0000 (00:33 +0200)
committerPavel Machek <pavel@ucw.cz>
Sat, 26 Sep 2020 19:56:41 +0000 (21:56 +0200)
commit19d4deb7b24024fa01c6dcaa781b9e508d4f09c0
tree26c30ae8bae1d45bf6dd1c702bcea9933126ccdf
parent40f97281ff0540d43d3d0343d74a8e96573ed227
leds: ns2: alloc simple array instead of struct ns2_led_priv

Since .remove method is not needed now that we use devres, there is no
need to remember the number of LEDs in struct ns2_led_priv. Alloc simple
array of ns2_led_data structs.

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