lkml.org 
[lkml]   [2022]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: pxa: schedule a devm action for the clock struct
On Tue, Jul 5, 2022 at 7:29 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> The clock is never released after probe(). Schedule devm actions for
> putting and disabling the clock.

...

> Reported-by: Signed-off-by: Yuan Can <yuancan@huawei.com>

Me puzzled.


...

> + ret = devm_add_action_or_reset(&pdev->dev, pxa_gpio_clk_put, clk);
> + if (ret)
> + return ret;
> +
> ret = clk_prepare_enable(clk);
> + if (ret)
> + return ret;
> +
> + ret = devm_add_action_or_reset(&pdev->dev,
> + pxa_gpio_clk_disable_unprepare, clk);
> + if (ret)
> return ret;

Can we use recently introduced clk APIs for that? Maybe Stephen has an
immutable branch you may reuse?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-07-06 13:50    [W:0.378 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site