* [RFC PATCH 31/57] drivers: rtc: Use class_find_device_by_name() helper
[not found] <1559577023-558-1-git-send-email-suzuki.poulose@arm.com>
@ 2019-06-03 15:49 ` Suzuki K Poulose
0 siblings, 0 replies; only message in thread
From: Suzuki K Poulose @ 2019-06-03 15:49 UTC (permalink / raw)
To: linux-kernel
Cc: gregkh, rafael, suzuki.poulose, Alessandro Zummo,
Alexandre Belloni, linux-rtc
Use the new class_find_device_by_name() helper.
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
drivers/rtc/interface.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 4124f4d..307dbc6 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -663,21 +663,12 @@ void rtc_update_irq(struct rtc_device *rtc,
}
EXPORT_SYMBOL_GPL(rtc_update_irq);
-static int __rtc_match(struct device *dev, const void *data)
-{
- const char *name = data;
-
- if (strcmp(dev_name(dev), name) == 0)
- return 1;
- return 0;
-}
-
struct rtc_device *rtc_class_open(const char *name)
{
struct device *dev;
struct rtc_device *rtc = NULL;
- dev = class_find_device(rtc_class, NULL, name, __rtc_match);
+ dev = class_find_device_by_name(rtc_class, NULL, name);
if (dev)
rtc = to_rtc_device(dev);
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-03 15:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1559577023-558-1-git-send-email-suzuki.poulose@arm.com>
2019-06-03 15:49 ` [RFC PATCH 31/57] drivers: rtc: Use class_find_device_by_name() helper Suzuki K Poulose
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).