Re: [PATCH v2 2/4] crypto: mxs-dcp - Add support for dcp clk

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

 



On Mon, Oct 15, 2018 at 10:28 AM Leonard Crestez
<leonard.crestez@xxxxxxx> wrote:

> +       /* DCP clock is optional, only used on some SOCs */
> +       sdcp->dcp_clk = devm_clk_get(dev, "dcp");
> +       if (IS_ERR(sdcp->dcp_clk)) {
> +               if (sdcp->dcp_clk != ERR_PTR(-ENOENT))
> +                       return PTR_ERR(sdcp->dcp_clk);
> +               sdcp->dcp_clk = NULL;
> +       }
> +
> +       ret = clk_prepare(sdcp->dcp_clk);
> +       if (ret)
> +               return ret;
> +       ret = clk_enable(sdcp->dcp_clk);
> +       if (ret)
> +               return ret;

Couldn't you use clk_prepare_enable() instead?



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux