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

Mark Brown broonie at kernel.org
Mon Jul 15 18:12:50 CEST 2013

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130715/4b180b03/attachment.sig>

More information about the Alsa-devel mailing list