[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230306120132.GA15995@pengutronix.de>
Date: Mon, 6 Mar 2023 13:01:32 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH] misc: sram: Improve and simplify clk handling
On Thu, Mar 02, 2023 at 10:12:51AM +0100, Uwe Kleine-König wrote:
> The current code tries to get an associated clk, ignores any errors in the
> process and if there is a clock enables it unconditionally for the whole
> lifetime of the sram device.
>
> Instead use an "optional" variant of devm_clk_get() which handles the case
> where no clk is needed for the sram device and do proper error handling
> for the remaining error cases. Also use an "enabled" variant of
> devm_clk_get() to simplify. With that .probe() is the only function using
> struct sram_dev::clk, so it can be replaced by a local variable.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@...gutronix.de>
regards
Philipp
Powered by blists - more mailing lists