[alsa-devel] [PATCH v3 2/2] ASoC: kirkwood: fix loss of external clock at probe time

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Sun Oct 20 10:03:33 CEST 2013


On Sat, Oct 19, 2013 at 10:28:09AM +0200, Jean-Francois Moine wrote:
> On Fri, 18 Oct 2013 21:12:59 +0200
> Uwe Kleine-König <u.kleine-koenig at pengutronix.de> wrote:
> 
> > > +	if (IS_ERR(priv->extclk)) {
> > > +		if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
> > > +			return -EPROBE_DEFER;  
> > Maybe the better logic here is:
> > 		if (!PTR_ERR(priv->extclk) == -ENOENT)
> > 			return PTR_ERR(priv->extclk);
> > 
> > ?
> 
> No. This patch is associated with an other one which returns
> -EPROBE_DEFER when the external clock is declared in the DT and when
> the clock driver is not yet initialized. Then, the kirkwood modules
> must be probed later.
Yes, that's understood. My suggestion behaves as your's for the return
values -EPROBE_DEFER and -ENOENT, so the deferred probe should work,
too. The question is only what you want to do for other errors (don't
know if they can happen at this stage). I'd say, on a dt parsing error
bail out, too.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |


More information about the Alsa-devel mailing list