On Thu, Jun 3, 2021 at 11:20 AM Joel Stanley <joel@xxxxxxxxx> wrote: > > The PCA955x driver since it was merged has added a "pca955x:" prefix to > LED names. This meanas platform data (such as the device tree) cannot means (Also missed space in the subject line) > fully control the name. So, it controls the main part of it. > Here's what this produces using the example in > the device tree bindings: > > # ls /sys/class/leds/ > pca955x:green:power/ > pca955x:pca9552:white/ > pca955x:pca9552:yellow/ > pca955x:red:power/ So, it means that example is broken, right? > Instead use the platform data when provided to name the LED device. > > Signed-off-by: Joel Stanley <joel@xxxxxxxxx> > --- > v2: Drop kconfig option, per Pavel's review: > > > No. Config option is not acceptable for this. > > > > Just delete the prefix and fix the breakage. I do not think we have a breakage here, rather a documentation issue. ... > - snprintf(pca955x_led->name, > - sizeof(pca955x_led->name), "pca955x:%s", > - pdata->leds[i].name); > + strscpy(pca955x_led->name, > + pdata->leds[i].name, > + sizeof(pca955x_led->name)); Changing to strspy() will become inconsistent with what's done in pca955x_get_pdata(). -- With Best Regards, Andy Shevchenko