[alsa-devel] [PATCH] ASoC: rsnd: use device dependency clock

Mark Brown broonie at kernel.org
Tue Feb 4 19:27:49 CET 2014


On Thu, Jan 30, 2014 at 11:30:26PM -0800, Kuninori Morimoto wrote:

> +	clk_orig	= clk_get(dev, NULL);
> +	adg->clk[CLKA]	= clk_get(dev, "clk_a");
> +	adg->clk[CLKB]	= clk_get(dev, "clk_b");
> +	adg->clk[CLKC]	= clk_get(dev, "clk_c");
> +	adg->clk[CLKI]	= clk_get(dev, "clk_i");
> +
> +	for_each_rsnd_clk(clk, adg, i) {
> +		if (clk_orig == clk) {
> +			dev_warn(dev,
> +				 "Audio clock doesn't support new style,"
> +				 "use old style\n");
> +			use_old_style = true;
> +			break;
> +		}
> +	}

This looks really strange though I appreciate it's a workaround for a
custom clock implementation.  I guess it's not possible for a kernel to
be built with both common and legacy clock implementations?  If that is
the case I think it would be clearer to just use an ifdef.

It's also better to not split error messages between lines, that makes
it easier to grep for the code that generated the error.
-------------- 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/20140204/2949d629/attachment.sig>


More information about the Alsa-devel mailing list