[PATCH 5/6] ASoC: fsl: use platform_device_id table to match p1022_ds device

Shawn Guo shawn.guo at linaro.org
Mon Feb 27 20:52:50 EST 2012


On Mon, Feb 27, 2012 at 03:39:17PM -0600, Timur Tabi wrote:
> Shawn Guo wrote:
> 
> > -
> > -	/*
> > -	 * Check if we're actually running on a P1022DS.  Older device trees
> > -	 * have a model of "fsl,P1022" and newer ones use "fsl,P1022DS", so we
> > -	 * need to support both.  The SSI driver uses that property to link to
> > -	 * the machine driver, so have to match it.
> > -	 */
> 
> Please retain this paragraph somewhere.  It's important to explain why
> we're checking for both strings.
> 

Ok, it will be something like the following.

/*
 * Check if we're actually running on a P1022DS.  Older device trees
 * have a model of "fsl,P1022" and newer ones use "fsl,P1022DS", so we
 * need to support both.  The SSI driver uses that property to link to
 * the machine driver, so have to match it.
 */
static struct platform_device_id p1022_ds_ids[] = {
	{ .name = "snd-soc-p1022ds", },
	{ .name = "snd-soc-p1022", },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, p1022_ds_ids);

-- 
Regards,
Shawn



More information about the linux-arm-kernel mailing list