[alsa-devel] [PATCH 5/6] ASoC: OMAP4: Add HDMI Audio machine driver for OMAP4 boards

Ricardo Neri ricardo.neri at ti.com
Thu May 5 23:09:19 CEST 2011


Am Donnerstag, den 05.05.2011, 03:25 -0500 schrieb Mark Brown:
> On Thu, May 05, 2011 at 02:21:52AM -0500, Ricardo Neri wrote:
> 
> > +static struct snd_soc_dai_link omap4_hdmi_dai = {
> > +		.name = "HDMI",
> > +		.stream_name = "HDMI",
> 
> Indentation.
I will correct.
> 
> > +static __devinit int omap4_hdmi_probe(struct platform_device *pdev)
> > +{
> > +	struct snd_soc_card *card = &snd_soc_omap4_hdmi;
> > +	int ret;
> > +
> > +	if (!cpu_is_omap44xx()) {
> > +		dev_err(&pdev->dev, "Not running on OMAP4!\n");
> > +		return -ENODEV;
> > +	}
> 
> Why check this?  If the system can't support the DAIs they won't
> register so it's redundant and it means more work for OMAP5.
I will remove this verification.
> 
> > +	card->dev = &pdev->dev;
> > +	platform_set_drvdata(pdev, card);
> 
> The set_drvdata() isn't needed.
I will remove this as well.
> 
> > +	snd_soc_unregister_card(card);
> > +	platform_set_drvdata(pdev, NULL);
> 
> You never need to reset driver data on unregister, nothing should
> reference it except a driver.
I saw that other drivers (harmony and mfld) reset driver data after
unregister. Is that incorrect as well? Anyways, I don't needed for my
driver.

> 
> > +MODULE_AUTHOR("Ricardo Neri <ricardo.neri at ti.com>");
> > +MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver");
> > +MODULE_LICENSE("GPL");
> 
> MODULE_ALIAS().
I will add.



More information about the Alsa-devel mailing list