diff mbox series

[v3] leds: pca955x: Allow platform data to set full name

Message ID 20210604041830.221635-1-joel@jms.id.au
State New
Headers show
Series [v3] leds: pca955x: Allow platform data to set full name | expand

Commit Message

Joel Stanley June 4, 2021, 4:18 a.m. UTC
The PCA955x driver since it was merged has added a "pca955x:" prefix to
LED names. This means platform data (such as the device tree) cannot
fully control the name. This patch drops the hardcoded prefix.

Signed-off-by: Joel Stanley <joel@jms.id.au>

---
v3: Fix typos in commit message, remove confusing example, and use
snprintf to be consistent with the rest of the driver.

v2: Drop kconfig option, per Pavel's review:

 > No. Config option is not acceptable for this.

 >

 > Just delete the prefix and fix the breakage.


 drivers/leds/leds-pca955x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.2
diff mbox series

Patch

diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
index 7087ca4592fc..24f44fb6da93 100644
--- a/drivers/leds/leds-pca955x.c
+++ b/drivers/leds/leds-pca955x.c
@@ -504,7 +504,7 @@  static int pca955x_probe(struct i2c_client *client,
 					sizeof(pdata->leds[i].name), "%d", i);
 
 			snprintf(pca955x_led->name,
-				sizeof(pca955x_led->name), "pca955x:%s",
+				sizeof(pca955x_led->name), "%s",
 				pdata->leds[i].name);
 
 			if (pdata->leds[i].default_trigger)