[alsa-devel] [PATCH] ASoC: sgtl5000: defer the probe if clock is not found

Shawn Guo shawn.guo at linaro.org
Mon Jul 15 18:19:43 CEST 2013

On Mon, Jul 15, 2013 at 05:12:50PM +0100, Mark Brown wrote:
> 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...

I'm not really fond of fixing a regression for -rc with involving clock
core change.  I think we can do that when that becomes a really common

> > +		/* 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.

Okay, will change that to respect your taste.


More information about the Alsa-devel mailing list