5 May
2011
5 May
'11
10:25 a.m.
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.
+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.
- card->dev = &pdev->dev;
- platform_set_drvdata(pdev, card);
The set_drvdata() isn't needed.
- 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.
+MODULE_AUTHOR("Ricardo Neri ricardo.neri@ti.com"); +MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver"); +MODULE_LICENSE("GPL");
MODULE_ALIAS().