All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] leds: pca955x: Allow platform data to set full name
@ 2021-06-04  4:18 Joel Stanley
  0 siblings, 0 replies; only message in thread
From: Joel Stanley @ 2021-06-04  4:18 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Cédric Le Goater, Andrew Jeffery, Vishwanatha Subbanna, linux-leds

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(-)

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)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-04  4:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04  4:18 [PATCH v3] leds: pca955x: Allow platform data to set full name Joel Stanley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.