lkml.org 
[lkml]   [2021]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] clk: tegra: clk-tegra124-dfll-fcpu: don't use devm functions for regulator
On Thu, Jun 24, 2021 at 11:47:37AM +0300, Alexandru Ardelean wrote:
> The purpose of the device-managed functions is to bind the life-time of an
> object to that of a parent device object.
>
> This is not the case for the 'vdd-cpu' regulator in this driver. A
> reference is obtained via devm_regulator_get() and immediately released
> with devm_regulator_put().
>
> In this case, the usage of devm_ functions is slightly excessive, as the
> un-managed versions of these functions is a little cleaner (and slightly
> more economical in terms of allocation).
>
> This change converts the devm_regulator_{get,put}() to
> regulator_{get,put}() in the get_alignment_from_regulator() function of
> this driver.
>
> Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
> ---
> drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Indeed, this seems unnecessary:

Reviewed-by: Thierry Reding <treding@nvidia.com>

Mike, Stephen: do you want to pick this up directly or would you prefer
if I collected this into a clk branch for the next cycle?

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-06-24 13:55    [W:0.109 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site