leds/led-class: Handle LEDs with the same name
The current code expected that every LED had an unique name. This is a legit expectation when the device tree can no be modified or extended. But with device tree overlays this requirement can be easily broken. This patch finds out if the name is already in use and adds the suffix _1, _2... if not. Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NBryan Wu <cooloney@gmail.com>
Showing
想要评论请 注册 或 登录