15 Jul
2013
15 Jul
'13
6:12 p.m.
On Mon, Jul 15, 2013 at 10:55:10PM +0800, Shawn Guo wrote:
It's not always the case that clock is already available when sgtl5000 get probed at the first time, e.g. the clock is provided by CPU DAI which may be probed after sgtl5000. So let's defer the probe when devm_clk_get() call fails and give it chance to try later.
My previous comments about this being better handled in the clock core appear to have been ignored and...
/* Defer the probe to see if the clk will be provided later */
return ret == -ENOENT ? -EPROBE_DEFER : ret;
...please try to avoid the ternery operator, it's not helpful for legibility.