[alsa-devel] [PATCH 2/2] ASoC: fix pxa-ssp compiling issue under mach-mmp

Mark Brown broonie at opensource.wolfsonmicro.com
Wed May 23 13:44:56 CEST 2012


On Tue, May 22, 2012 at 02:58:26PM +0800, Qiao Zhou wrote:

> +#if defined(CONFIG_ARCH_PXA)
>  	if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) {
>  		sscr0 &= ~0x0000ff00;
>  		sscr0 |= ((div - 2)/2) << 8; /* 2..512 */
>  	} else {
> +#endif
>  		sscr0 &= ~0x000fff00;
>  		sscr0 |= (div - 1) << 8;     /* 1..4096 */
> +#if defined(CONFIG_ARCH_PXA)
>  	}
> +#endif

This is pretty large and fiddly, especially code like the above.  Would
it not be simpler to just define always false versions of these when on
MMP, either in this driver or in the arch headers (where it'd help other
drivers too)?  Right now it doesn't make the code look nice.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120523/32c0b89b/attachment.sig 


More information about the Alsa-devel mailing list