Christophe JAILLET 94e4603d1a rtc: jz4740: Use devm_clk_get_enabled() helper
The devm_clk_get_enabled() helper:
   - calls devm_clk_get()
   - calls clk_prepare_enable() and registers what is needed in order to
     call clk_disable_unprepare() when needed, as a managed resource.

This simplifies the code, the error handling paths and avoid the need of
a dedicated function used with devm_add_action_or_reset().

As a side effect, some error messages are not logged anymore, so also use
dev_err_probe() instead of dev_err() in case of error.
At least the error code will be logged (and -EPROBE_DEFER will be filtered)

Based on my test with allyesconfig, this reduces the .o size from:
   text	   data	    bss	    dec	    hex	filename
   9025	   2488	    128	  11641	   2d79	drivers/rtc/rtc-jz4740.o
down to:
   8267	   2080	    128	  10475	   28eb	drivers/rtc/rtc-jz4740.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/af10570000d7e103d70bbea590ce8df4f8902b67.1661330532.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2022-10-13 00:31:37 +02:00
..
2022-06-24 21:44:53 +02:00
2022-06-24 21:24:02 +02:00
2021-08-10 23:21:46 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2021-12-02 23:23:38 +01:00
2022-06-24 21:24:02 +02:00
2021-09-25 23:22:28 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2021-04-29 23:03:26 +02:00
2021-05-25 00:41:25 +02:00
2022-06-24 21:24:02 +02:00
2021-10-01 23:28:28 +02:00
2021-01-16 23:19:26 +01:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-04-19 16:27:05 +02:00
2021-10-18 17:20:50 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-05-25 01:24:21 +02:00
2021-10-23 23:57:23 +02:00
2021-09-25 23:26:37 +02:00
2022-06-24 21:24:02 +02:00
2022-06-24 21:24:02 +02:00
2022-08-09 00:56:41 +02:00
2020-12-03 23:43:23 +01:00
2022-06-24 21:24:02 +02:00