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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux