From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Adam Ford <aford173@gmail.com>, linux-renesas-soc@vger.kernel.org
Cc: aford@beaconembedded.com, "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 4/4] net: ethernet: ravb: Enable optional refclk
Date: Sat, 16 Jan 2021 12:55:07 +0300 [thread overview]
Message-ID: <ce35708b-34ee-cc0a-3cf7-ff955f14db2d@gmail.com> (raw)
In-Reply-To: <20210115201953.443710-4-aford173@gmail.com>
Hello!
On 15.01.2021 23:19, Adam Ford wrote:
> For devices that use a programmable clock for the avb reference clock,
AVB.
> the driver may need to enable them. Add code to find the optional clock
> and enable it when available.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index bd30505fbc57..739e30f45daa 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2148,6 +2148,14 @@ static int ravb_probe(struct platform_device *pdev)
> goto out_release;
> }
>
> + priv->refclk = devm_clk_get_optional(&pdev->dev, "refclk");
> + if (IS_ERR(priv->refclk)) {
> + error = PTR_ERR(priv->refclk);
> + goto out_release;
> + } else {
No need for *else* after *goto*.
> + (void)clk_prepare_enable(priv->refclk);
You can really omit (void)...
Also, I'm not seeing where do you call clk_disable_unprepare()...
[...]
MBR, Sergei
prev parent reply other threads:[~2021-01-16 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 20:19 [PATCH V2 1/4] dt-bindings: net: renesas,etheravb: Add additional clocks Adam Ford
2021-01-15 20:19 ` [PATCH V2 2/4] ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list Adam Ford
2021-01-15 20:19 ` [PATCH V2 3/4] arm64: dts: renesas: Add fck to etheravb-rcar-gen3 " Adam Ford
2021-01-15 20:19 ` [PATCH V2 4/4] net: ethernet: ravb: Enable optional refclk Adam Ford
2021-01-16 9:55 ` Sergei Shtylyov [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=ce35708b-34ee-cc0a-3cf7-ff955f14db2d@gmail.com \
--to=sergei.shtylyov@gmail.com \
--cc=aford173@gmail.com \
--cc=aford@beaconembedded.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).