lkml.org 
[lkml]   [2018]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'
Date
Quoting Uwe Kleine-König (2018-11-13 01:52:10)
>
> I wonder if it would make sense to introduce functions like:
>
> struct clk *clk_get_optional(struct device *dev, const char *id)
>
> that return NULL instead of ERR_PTR(-ENODEV).
>
> Then the above would simplify to:
>
> pc->clks[i] = devm_clk_get_optional(&pdev->dev, mtk_pwm_clk_name[i]);
> if (IS_ERR(pc->clks[i]) {
> if (PTR_ERR(pc->clks[i]) == -EPROBE_DEFER)
> dev_err(...);
> return PTR_ERR(pc->clks[i]);
> }
>
> (added the clk people to Cc for this question).
>

Such a patch is already on the list and not getting much review.

http://lkml.kernel.org/r/1535724443-21150-1-git-send-email-phil.edworthy@renesas.com

\
 
 \ /
  Last update: 2018-11-13 19:01    [W:0.119 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site