Re: [PATCH v2 1/5] dmaengine: qcom: bam_dma: make bam clk optional

From
Bjorn Andersson <hidden>
Date
2018-02-14 18:47:14
Also in
dmaengine, linux-arm-msm, lkml
Reply to
Srinivas Kandagatla, 2018-02-14
On Wed 14 Feb 10:19 PST 2018, Srinivas Kandagatla wrote:
Thanks for the Review,

On 14/02/18 15:41, Bjorn Andersson wrote:
quoted
quoted
  	bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
-	if (IS_ERR(bdev->bamclk))
-		return PTR_ERR(bdev->bamclk);
-
-	ret = clk_prepare_enable(bdev->bamclk);
-	if (ret) {
-		dev_err(bdev->dev, "failed to prepare/enable clock\n");
-		return ret;
+	if (IS_ERR(bdev->bamclk)) {
In the case of !bdev->controlled_remotely I think this should still be
an error.
Yep makes sense,

You mean something like this?

------------------------->cut<------------------------
        bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
        if (IS_ERR(bdev->bamclk)) {
                if (!bdev->controlled_remotely);
                        return PTR_ERR(bdev->bamclk);

                bdev->bamclk = NULL;
        }

        ret = clk_prepare_enable(bdev->bamclk);
        if (ret) {
                dev_err(bdev->dev, "failed to prepare/enable clock\n");
                return ret;
        }

------------------------->cut<------------------------
Yes

Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thread (9 messages) 9 messages, 2 authors, last reply 2018-02-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help