Bartosz Golaszewski fdcfd85433 rtc: rework rtc_register_device() resource management
rtc_register_device() is a managed interface but it doesn't use devres
by itself - instead it marks an rtc_device as "registered" and the devres
callback for devm_rtc_allocate_device() takes care of resource release.

This doesn't correspond with the design behind devres where managed
structures should not be aware of being managed. The correct solution
here is to register a separate devres callback for unregistering the
device.

While at it: rename rtc_register_device() to devm_rtc_register_device()
and add it to the list of managed interfaces in devres.rst. This way we
can avoid any potential confusion of driver developers who may expect
there to exist a corresponding unregister function.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201109163409.24301-8-brgl@bgdev.pl
2020-11-19 12:50:12 +01:00
..
2020-01-24 07:33:57 +00:00
2019-08-14 09:07:20 +01:00
2019-07-15 20:18:40 -07:00
2019-12-01 16:16:31 -08:00
2020-10-05 09:09:26 +01:00
2020-09-30 16:25:29 +01:00
2019-07-02 12:11:31 +01:00
2019-07-15 20:18:40 -07:00
2017-07-18 08:27:18 +01:00
2020-09-30 16:25:19 +01:00
2020-10-14 15:56:58 -07:00
2019-07-09 08:59:39 -07:00