lkml.org 
[lkml]   [2018]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/4] crypto: mxs-dcp - Add support for dcp clk
On Mon, Oct 15, 2018 at 10:28 AM Leonard Crestez
<leonard.crestez@nxp.com> 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?

\
 
 \ /
  Last update: 2018-10-15 16:02    [W:0.104 / U:2.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site