[alsa-devel] [PATCH v2 4/4] OMAP4: DMIC: Add DMIC codec platform devices

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Jan 6 23:25:42 CET 2011


On Thu, Jan 06, 2011 at 08:00:39AM -0600, David Lambert wrote:
> This creates the DMIC codec platform devices.
> 
> The platform devices create an instance of the driver during boot up.
> 
> Signed-off-by: David Lambert <dlambert at ti.com>

Acked-by: Mark Brown <broonie at opensource.wolfsonmicro.com>

though:

> +static struct platform_device codec_dmic0 = {
> +	.name   = "dmic-codec",
> +	.id     = -1,
> +};

> +static inline void omap_dmic_init(void)
> +{
> +	platform_device_register(&codec_dmic0);
> +}

This feels like bad namespacing as the name is OMAP-generic but it's
actually board specific.

It might also be more sensible to just have an array of platform devices
with one entry and register that rather than bouncing through this
function as it doesn't add anything and it'll get more and more verbose
as more platform devices are added.

It may be that these things are idiomatic, though - I've not looked at
the surrounding code.


More information about the Alsa-devel mailing list