mfd: syscon: Simplify syscon_match_pdevname()
Subsystems (2)
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.
Signed-off-by Alexander Shiyan <[email protected]>
--- drivers/mfd/syscon.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/mfd/syscon.c +0 -7
@@ -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
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.Signed-off-by Alexander Shiyan <[email protected]>--- drivers/mfd/syscon.c | 7 ------- 1 file changed, 7 deletions(-)
Looks sane:
Acked-by Lee Jones <[email protected]>
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
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.Signed-off-by Alexander Shiyan <[email protected]>--- drivers/mfd/syscon.c | 7 ------- 1 file changed, 7 deletions(-)Looks sane:
Acked-by Lee Jones <[email protected]>
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