]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit85a9a90973eb3e4fe147812d4a8b89eb1c3de969
tree33230dec2dfa16ee83a368376fe44e219d25c6b6
parent3219ffa7e94fce1695855105104798ab4d5c10c7
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