Re: [PATCH] mmc: renesas_sdhi: Use devm_clk_get_optional() to obtain CD clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 16 Nov 2021 at 14:36, Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> wrote:
>
> Use the existing devm_clk_get_optional() helper to obtain the optional
> Card Detect clock, instead of open-coding the same operation.
> a side effect, real errors will now be handled correctly instead of
> being ignored.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Acked-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>

I guess it's best if you continue to funnel renesas_sdhi changes
through your tree for the current cycle, to avoid conflicts. Right?

Kind regards
Uffe

> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index a6c47362035a0415..f41225a34f4ae863 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -936,9 +936,9 @@ int renesas_sdhi_probe(struct platform_device *pdev,
>          * to the card detect circuit. That leaves us with if separate clocks
>          * are presented, we must treat them both as virtually 1 clock.
>          */
> -       priv->clk_cd = devm_clk_get(&pdev->dev, "cd");
> +       priv->clk_cd = devm_clk_get_optional(&pdev->dev, "cd");
>         if (IS_ERR(priv->clk_cd))
> -               priv->clk_cd = NULL;
> +               return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk_cd), "cannot get cd clock");
>
>         priv->pinctrl = devm_pinctrl_get(&pdev->dev);
>         if (!IS_ERR(priv->pinctrl)) {
> --
> 2.25.1
>



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux