From: Philipp Zabel <p.zabel@pengutronix.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] misc: sram: Improve and simplify clk handling
Date: Mon, 6 Mar 2023 13:01:32 +0100 [thread overview]
Message-ID: <20230306120132.GA15995@pengutronix.de> (raw)
In-Reply-To: <20230302091251.1852454-1-u.kleine-koenig@pengutronix.de>
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@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
prev parent reply other threads:[~2023-03-06 12:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 9:12 Uwe Kleine-König
2023-03-06 12:01 ` Philipp Zabel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230306120132.GA15995@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®