[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1559577023-558-48-git-send-email-suzuki.poulose@arm.com>
Date: Mon, 3 Jun 2019 16:50:13 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org, rafael@...nel.org,
suzuki.poulose@....com, Lee Jones <lee.jones@...aro.org>,
Arnd Bergmann <arnd@...db.de>
Subject: [RFC PATCH 47/57] drivers: mfd: Use driver_find_device_by_name helper
Use the new driver_find_device_by_name() helper.
Cc: Lee Jones <lee.jones@...aro.org>
Cc: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
---
drivers/mfd/syscon.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 4f39ba5..e51e39a 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -190,18 +190,12 @@ 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, const 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);
+ dev = driver_find_device_by_name(&syscon_driver.driver, NULL, s);
if (!dev)
return ERR_PTR(-EPROBE_DEFER);
--
2.7.4
Powered by blists - more mailing lists