On Mon Jul 6 13:13:29 2026 +0100, Sean Young wrote:
> clk_prepare_enable() needs a call to clk_disable_unprepare() on
> driver unbind. Make it devm managed.
> 
> Fixes: 49be1c78d575 ("media: rc: introduce Meson IR TX driver")
> Signed-off-by: Sean Young <[email protected]>
> Reviewed-by: Martin Blumenstingl <[email protected]>
> Cc: [email protected]
> Reviewed-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Sean Young

 drivers/media/rc/meson-ir-tx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index fded2c256f2a..6beb9e97453d 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -288,11 +288,12 @@ static int meson_irtx_mod_clock_probe(struct meson_irtx 
*ir,
        if (!np)
                return -ENODEV;
 
-       clock = devm_clk_get(ir->dev, "xtal");
-       if (IS_ERR(clock) || clk_prepare_enable(clock))
+       *clk_nr = IRB_MOD_XTAL3_CLK;
+
+       clock = devm_clk_get_enabled(ir->dev, "xtal");
+       if (IS_ERR(clock))
                return -ENODEV;
 
-       *clk_nr = IRB_MOD_XTAL3_CLK;
        ir->clk_rate = clk_get_rate(clock) / 3;
 
        if (ir->clk_rate < IRB_MOD_1US_CLK_RATE) {
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to