diff mbox series

[v2,02/28] mfd: Remove unused helper syscon_regmap_lookup_by_pdevname

Message ID 1560534863-15115-3-git-send-email-suzuki.poulose@arm.com
State Accepted
Commit 29d14b668d2f2e7b692525ee3f69bf12b06be0f0
Headers show
Series [v2,01/28] staging: most-core: Use bus_find_device_by_name | expand

Commit Message

Suzuki K Poulose June 14, 2019, 5:53 p.m. UTC
Nobody uses the exported helper syscon_regmap_lookup_by_pdevname,
to lookup a device by name. Let us remove it.

Suggested-by: Arnd Bergman <arnd@arnd.de>
Cc: Arnd Bergman <arnd@arnd.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

---
Hi,

This patch again, could be separate from the series. However, it
will conflict with the series during the merge. I have included it
here before the actual series changes appear. Please do the necessary.
---
 drivers/mfd/syscon.c       | 21 ---------------------
 include/linux/mfd/syscon.h |  6 ------
 2 files changed, 27 deletions(-)

-- 
2.7.4

Comments

Lee Jones July 25, 2019, 10:50 a.m. UTC | #1
On Fri, 14 Jun 2019, Suzuki K Poulose wrote:

> Nobody uses the exported helper syscon_regmap_lookup_by_pdevname,

> to lookup a device by name. Let us remove it.

> 

> Suggested-by: Arnd Bergman <arnd@arnd.de>

> Cc: Arnd Bergman <arnd@arnd.de>

> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

> Cc: "Rafael J. Wysocki" <rafael@kernel.org>

> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

> ---

> Hi,

> 

> This patch again, could be separate from the series. However, it

> will conflict with the series during the merge. I have included it

> here before the actual series changes appear. Please do the necessary.

> ---

>  drivers/mfd/syscon.c       | 21 ---------------------

>  include/linux/mfd/syscon.h |  6 ------

>  2 files changed, 27 deletions(-)


Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
diff mbox series

Patch

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 8ce1e41..b65e585 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -190,27 +190,6 @@  struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
 }
 EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible);
 
-static int syscon_match_pdevname(struct device *dev, void *data)
-{
-	return !strcmp(dev_name(dev), (const char *)data);
-}
-
-struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
-{
-	struct device *dev;
-	struct syscon *syscon;
-
-	dev = driver_find_device(&syscon_driver.driver, NULL, (void *)s,
-				 syscon_match_pdevname);
-	if (!dev)
-		return ERR_PTR(-EPROBE_DEFER);
-
-	syscon = dev_get_drvdata(dev);
-
-	return syscon->regmap;
-}
-EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_pdevname);
-
 struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np,
 					const char *property)
 {
diff --git a/include/linux/mfd/syscon.h b/include/linux/mfd/syscon.h
index f0273c9..8cfda05 100644
--- a/include/linux/mfd/syscon.h
+++ b/include/linux/mfd/syscon.h
@@ -19,7 +19,6 @@  struct device_node;
 #ifdef CONFIG_MFD_SYSCON
 extern struct regmap *syscon_node_to_regmap(struct device_node *np);
 extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
-extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s);
 extern struct regmap *syscon_regmap_lookup_by_phandle(
 					struct device_node *np,
 					const char *property);
@@ -34,11 +33,6 @@  static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s)
 	return ERR_PTR(-ENOTSUPP);
 }
 
-static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
-{
-	return ERR_PTR(-ENOTSUPP);
-}
-
 static inline struct regmap *syscon_regmap_lookup_by_phandle(
 					struct device_node *np,
 					const char *property)