summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-11-10 15:25:44 -0500
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-11-12 17:14:10 -0500
commit03f39f47dc86fc4defbf9b97f8417f192d1ccba6 (patch)
tree9e54476f4e684abe2ae6632e7ae4264dc32dae78
parent4ff6f0249e213eab98828b2d19e896a143fc7e28 (diff)
rtc: class: remove devm_rtc_device_unregister
devm_rtc_device_unregister is not used by any driver and should not be used by any new driver. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/rtc/class.c26
-rw-r--r--include/linux/rtc.h2
2 files changed, 0 insertions, 28 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 3b43787f154b..6d364085bd86 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -380,13 +380,6 @@ static void devm_rtc_device_release(struct device *dev, void *res)
380 rtc_device_unregister(rtc); 380 rtc_device_unregister(rtc);
381} 381}
382 382
383static int devm_rtc_device_match(struct device *dev, void *res, void *data)
384{
385 struct rtc **r = res;
386
387 return *r == data;
388}
389
390/** 383/**
391 * devm_rtc_device_register - resource managed rtc_device_register() 384 * devm_rtc_device_register - resource managed rtc_device_register()
392 * @dev: the device to register 385 * @dev: the device to register
@@ -424,25 +417,6 @@ struct rtc_device *devm_rtc_device_register(struct device *dev,
424} 417}
425EXPORT_SYMBOL_GPL(devm_rtc_device_register); 418EXPORT_SYMBOL_GPL(devm_rtc_device_register);
426 419
427/**
428 * devm_rtc_device_unregister - resource managed devm_rtc_device_unregister()
429 * @dev: the device to unregister
430 * @rtc: the RTC class device to unregister
431 *
432 * Deallocated a rtc allocated with devm_rtc_device_register(). Normally this
433 * function will not need to be called and the resource management code will
434 * ensure that the resource is freed.
435 */
436void devm_rtc_device_unregister(struct device *dev, struct rtc_device *rtc)
437{
438 int rc;
439
440 rc = devres_release(dev, devm_rtc_device_release,
441 devm_rtc_device_match, rtc);
442 WARN_ON(rc);
443}
444EXPORT_SYMBOL_GPL(devm_rtc_device_unregister);
445
446static void devm_rtc_release_device(struct device *dev, void *res) 420static void devm_rtc_release_device(struct device *dev, void *res)
447{ 421{
448 struct rtc_device *rtc = *(struct rtc_device **)res; 422 struct rtc_device *rtc = *(struct rtc_device **)res;
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index c8bb4a2b48c3..311375dbb673 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -173,8 +173,6 @@ extern struct rtc_device *devm_rtc_device_register(struct device *dev,
173 struct module *owner); 173 struct module *owner);
174struct rtc_device *devm_rtc_allocate_device(struct device *dev); 174struct rtc_device *devm_rtc_allocate_device(struct device *dev);
175int __rtc_register_device(struct module *owner, struct rtc_device *rtc); 175int __rtc_register_device(struct module *owner, struct rtc_device *rtc);
176extern void devm_rtc_device_unregister(struct device *dev,
177 struct rtc_device *rtc);
178 176
179extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); 177extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm);
180extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); 178extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm);