mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mfd: syscon: Simplify syscon_match_pdevname()
@ 2014-03-10 10:57 Alexander Shiyan
  2014-03-10 12:43 ` Lee Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Shiyan @ 2014-03-10 10:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: Samuel Ortiz, Lee Jones, Alexander Shiyan

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 <shc_work@mail.ru>
---
 drivers/mfd/syscon.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 2620056..dbea55d 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -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);
 }
 
-- 
1.8.3.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: syscon: Simplify syscon_match_pdevname()
  2014-03-10 10:57 [PATCH] mfd: syscon: Simplify syscon_match_pdevname() Alexander Shiyan
@ 2014-03-10 12:43 ` Lee Jones
  2014-03-10 12:44   ` Lee Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Lee Jones @ 2014-03-10 12:43 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-kernel, Samuel Ortiz

> 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 <shc_work@mail.ru>
> ---
>  drivers/mfd/syscon.c | 7 -------
>  1 file changed, 7 deletions(-)

Looks sane:
  Acked-by: Lee Jones <lee.jones@linaro.org>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: syscon: Simplify syscon_match_pdevname()
  2014-03-10 12:43 ` Lee Jones
@ 2014-03-10 12:44   ` Lee Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Lee Jones @ 2014-03-10 12:44 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-kernel, Samuel Ortiz

On Mon, 10 Mar 2014, Lee Jones wrote:

> > 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 <shc_work@mail.ru>
> > ---
> >  drivers/mfd/syscon.c | 7 -------
> >  1 file changed, 7 deletions(-)
> 
> Looks sane:
>   Acked-by: Lee Jones <lee.jones@linaro.org>

Whoops, sorry! I mean applied.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-10 12:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-10 10:57 [PATCH] mfd: syscon: Simplify syscon_match_pdevname() Alexander Shiyan
2014-03-10 12:43 ` Lee Jones
2014-03-10 12:44   ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®