mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mfd: syscon: Remove unused helper syscon_base_lookup_by_pdevname
@ 2023-05-05  6:12 Alexander Shiyan
  2023-05-09  7:24 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2023-05-05  6:12 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Shiyan

Nobody uses the exported helper syscon_base_lookup_by_pdevname,
to lookup a syscon by device name. Let us remove it.

Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
 drivers/mfd/syscon.c | 15 ---------------
 include/mfd/syscon.h |  6 ------
 2 files changed, 21 deletions(-)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 5d1fed4aee..16d78de2af 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -142,21 +142,6 @@ static void __iomem *syscon_node_to_base(struct device_node *np)
 	return syscon->base;
 }
 
-void __iomem *syscon_base_lookup_by_pdevname(const char *s)
-{
-	struct syscon *syscon;
-	struct device *dev;
-
-	for_each_device(dev) {
-		if (!strcmp(dev_name(dev), s)) {
-			syscon = dev->priv;
-			return syscon->base;
-		}
-	}
-
-	return ERR_PTR(-ENODEV);
-}
-
 void __iomem *syscon_base_lookup_by_phandle(struct device_node *np,
 					    const char *property)
 {
diff --git a/include/mfd/syscon.h b/include/mfd/syscon.h
index b47aa1e160..3ccfd7fb5b 100644
--- a/include/mfd/syscon.h
+++ b/include/mfd/syscon.h
@@ -17,7 +17,6 @@
 #include <regmap.h>
 
 #ifdef CONFIG_MFD_SYSCON
-void __iomem *syscon_base_lookup_by_pdevname(const char *s);
 void __iomem *syscon_base_lookup_by_phandle
 	(struct device_node *np, const char *property);
 struct regmap *syscon_node_to_regmap(struct device_node *np);
@@ -27,11 +26,6 @@ extern struct regmap *syscon_regmap_lookup_by_phandle(
 					struct device_node *np,
 					const char *property);
 #else
-static inline void __iomem *syscon_base_lookup_by_pdevname(const char *s)
-{
-	return ERR_PTR(-ENOSYS);
-}
-
 static inline void __iomem *syscon_base_lookup_by_phandle
 	(struct device_node *np, const char *property)
 {
-- 
2.39.1




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

* Re: [PATCH] mfd: syscon: Remove unused helper syscon_base_lookup_by_pdevname
  2023-05-05  6:12 [PATCH] mfd: syscon: Remove unused helper syscon_base_lookup_by_pdevname Alexander Shiyan
@ 2023-05-09  7:24 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-05-09  7:24 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Fri, May 05, 2023 at 09:12:44AM +0300, Alexander Shiyan wrote:
> Nobody uses the exported helper syscon_base_lookup_by_pdevname,
> to lookup a syscon by device name. Let us remove it.
> 
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
>  drivers/mfd/syscon.c | 15 ---------------
>  include/mfd/syscon.h |  6 ------
>  2 files changed, 21 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index 5d1fed4aee..16d78de2af 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -142,21 +142,6 @@ static void __iomem *syscon_node_to_base(struct device_node *np)
>  	return syscon->base;
>  }
>  
> -void __iomem *syscon_base_lookup_by_pdevname(const char *s)
> -{
> -	struct syscon *syscon;
> -	struct device *dev;
> -
> -	for_each_device(dev) {
> -		if (!strcmp(dev_name(dev), s)) {
> -			syscon = dev->priv;
> -			return syscon->base;
> -		}
> -	}
> -
> -	return ERR_PTR(-ENODEV);
> -}
> -
>  void __iomem *syscon_base_lookup_by_phandle(struct device_node *np,
>  					    const char *property)
>  {
> diff --git a/include/mfd/syscon.h b/include/mfd/syscon.h
> index b47aa1e160..3ccfd7fb5b 100644
> --- a/include/mfd/syscon.h
> +++ b/include/mfd/syscon.h
> @@ -17,7 +17,6 @@
>  #include <regmap.h>
>  
>  #ifdef CONFIG_MFD_SYSCON
> -void __iomem *syscon_base_lookup_by_pdevname(const char *s);
>  void __iomem *syscon_base_lookup_by_phandle
>  	(struct device_node *np, const char *property);
>  struct regmap *syscon_node_to_regmap(struct device_node *np);
> @@ -27,11 +26,6 @@ extern struct regmap *syscon_regmap_lookup_by_phandle(
>  					struct device_node *np,
>  					const char *property);
>  #else
> -static inline void __iomem *syscon_base_lookup_by_pdevname(const char *s)
> -{
> -	return ERR_PTR(-ENOSYS);
> -}
> -
>  static inline void __iomem *syscon_base_lookup_by_phandle
>  	(struct device_node *np, const char *property)
>  {
> -- 
> 2.39.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2023-05-09  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-05  6:12 [PATCH] mfd: syscon: Remove unused helper syscon_base_lookup_by_pdevname Alexander Shiyan
2023-05-09  7:24 ` Sascha Hauer

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