X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=sound%2Fsoc%2Fnuc900%2Fnuc900-ac97.c;h=e00e39dd65761911b42295a6e2ef857758db3b61;hp=caa7c901bc2e131a24fbfe90e442242ab2e22185;hb=d6f443ae4c1d54379ad5953d7bcb89a63387184d;hpb=6b5b817f103450444f3f658a498f435d92a197e5 diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index caa7c901bc2e..e00e39dd6576 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -297,8 +296,7 @@ static struct snd_soc_dai_ops nuc900_ac97_dai_ops = { .trigger = nuc900_ac97_trigger, }; -struct snd_soc_dai nuc900_ac97_dai = { - .name = "nuc900-ac97", +static struct snd_soc_dai_driver nuc900_ac97_dai = { .probe = nuc900_ac97_probe, .remove = nuc900_ac97_remove, .ac97_control = 1, @@ -316,7 +314,6 @@ struct snd_soc_dai nuc900_ac97_dai = { }, .ops = &nuc900_ac97_dai_ops, } -EXPORT_SYMBOL_GPL(nuc900_ac97_dai); static int __devinit nuc900_ac97_drvprobe(struct platform_device *pdev) { @@ -365,9 +362,7 @@ static int __devinit nuc900_ac97_drvprobe(struct platform_device *pdev) nuc900_ac97_data = nuc900_audio; - nuc900_audio->dev = nuc900_ac97_dai.dev = &pdev->dev; - - ret = snd_soc_register_dai(&nuc900_ac97_dai); + ret = snd_soc_register_dai(&pdev->dev, &nuc900_ac97_dai); if (ret) goto out3; @@ -389,14 +384,14 @@ out0: static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) { - - snd_soc_unregister_dai(&nuc900_ac97_dai); + snd_soc_unregister_dai(&pdev->dev); clk_put(nuc900_ac97_data->clk); iounmap(nuc900_ac97_data->mmio); release_mem_region(nuc900_ac97_data->res->start, resource_size(nuc900_ac97_data->res)); + kfree(nuc900_ac97_data); nuc900_ac97_data = NULL; return 0; @@ -404,7 +399,7 @@ static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev) static struct platform_driver nuc900_ac97_driver = { .driver = { - .name = "nuc900-audio", + .name = "nuc900-ac97", .owner = THIS_MODULE, }, .probe = nuc900_ac97_drvprobe,