rtc: shrink devm_rtc_allocate_device()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 9 Nov 2020 16:34:09 +0000 (17:34 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 19 Nov 2020 11:50:12 +0000 (12:50 +0100)
commit1bfc485b73579bff5326ac481fd9be7e24a5d5d1
tree33230dec2dfa16ee83a368376fe44e219d25c6b6
parentfdcfd854333be5b30377dc5daa9cd0fa1643a979
rtc: shrink devm_rtc_allocate_device()

We don't need to use devres_alloc() & devres_add() manually if all we
want to manage is a single pointer. We can shrink the code by using
devm_add_action_or_reset() instead. The number of allocations stays
the same.

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-9-brgl@bgdev.pl
drivers/rtc/class.c