Skip to contentSkip to conversation

mfd: syscon: Simplify syscon_match_pdevname()

PATCH In review Alexander Shiyan 2 participants 3 messages Mar 10, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: syscon: Simplify syscon_match_pdevname()

Since we do not want to add new platform IDs for the syscon driver, there is no reason to iterate over IDs. This patch simplifies syscon_match_pdevname() function to remove such iteration.

---
 drivers/mfd/syscon.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/mfd/syscon.c +0 -7
index 2620056..dbea55d 100644
@@ -69,13 +69,6 @@ EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible);
 
 static int syscon_match_pdevname(struct device *dev, void *data)
 {
-	struct platform_device *pdev = to_platform_device(dev);
-	const struct platform_device_id *id = platform_get_device_id(pdev);
-
-	if (id)
-		if (!strcmp(id->name, (const char *)data))
-			return 1;
-
 	return !strcmp(dev_name(dev), (const char *)data);
 }
 
Signature · 1 line
1.8.3.2
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines

Since we do not want to add new platform IDs for the syscon driver, there is no reason to iterate over IDs. This patch simplifies syscon_match_pdevname() function to remove such iteration.

---
 drivers/mfd/syscon.c | 7 -------
 1 file changed, 7 deletions(-)

Looks sane:

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#2 lore raw
Quoted 11 lines · Lee Jones
Quoted 8 lines

Since we do not want to add new platform IDs for the syscon driver, there is no reason to iterate over IDs. This patch simplifies syscon_match_pdevname() function to remove such iteration.

---
 drivers/mfd/syscon.c | 7 -------
 1 file changed, 7 deletions(-)

Looks sane:

Whoops, sorry! I mean applied.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog