rtc: tegra: Use devm_clk_get_enabled() in probe
authorKartik Rajput <kkartik@nvidia.com>
Fri, 24 Oct 2025 06:49:50 +0000 (12:19 +0530)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 8 Dec 2025 21:26:41 +0000 (22:26 +0100)
commitb665c1b620e75e85ea85215735130fd4597bc47f
tree57a141e109f4f4382409a0f3cc8e8e0097826812
parent53e71c177cd84982138457b617342f68511e0b64
rtc: tegra: Use devm_clk_get_enabled() in probe

Simplify clock management by replacing devm_clk_get() and manual clock
enable/disable with devm_clk_get_enabled(). This also simplifies the
error handling logic. Also remove tegra_rtc_remove() as the clock will
automatically be disabled when the device is unbound from the bus.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20251024064952.775883-1-kkartik@nvidia.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-tegra.c