leds: pca955x: Prevent crippled LED device name
authorJacek Anaszewski <jacek.anaszewski@gmail.com>
Thu, 17 Aug 2017 20:16:48 +0000 (22:16 +0200)
committerJacek Anaszewski <jacek.anaszewski@gmail.com>
Tue, 29 Aug 2017 19:10:37 +0000 (21:10 +0200)
commit390c97dc6e346b65df61c18fade67577896382fd
tree14da6e137a3bb47c754eb454eb24579eef4841d1
parent430e48ecf31f4f897047f22e02abdfa75730cad8
leds: pca955x: Prevent crippled LED device name

In case platform data provided empty LED name string the resulting
LED class device name would be crippled. Use corresponding LED chip
bit in place of "function" segment of LED class device name then to
make the LEDs at least distinguishable.

Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Reported-by: Colin King <colin.king@canonical.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Suggested-by: Nate Case <ncase@xes-inc.com>
drivers/leds/leds-pca955x.c