Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

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

 



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@xxxxxxxxxxx





[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