aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/nuc900/nuc900-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/nuc900/nuc900-pcm.c')
-rw-r--r--sound/soc/nuc900/nuc900-pcm.c38
1 files changed, 28 insertions, 10 deletions
diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c
index e81e803b3a63..195d1ac94771 100644
--- a/sound/soc/nuc900/nuc900-pcm.c
+++ b/sound/soc/nuc900/nuc900-pcm.c
@@ -328,26 +328,44 @@ static int nuc900_dma_new(struct snd_card *card,
328 return 0; 328 return 0;
329} 329}
330 330
331struct snd_soc_platform nuc900_soc_platform = { 331static struct snd_soc_platform_driver nuc900_soc_platform = {
332 .name = "nuc900-dma", 332 .ops = &nuc900_dma_ops,
333 .pcm_ops = &nuc900_dma_ops,
334 .pcm_new = nuc900_dma_new, 333 .pcm_new = nuc900_dma_new,
335 .pcm_free = nuc900_dma_free_dma_buffers, 334 .pcm_free = nuc900_dma_free_dma_buffers,
336} 335}
337EXPORT_SYMBOL_GPL(nuc900_soc_platform);
338 336
339static int __init nuc900_soc_platform_init(void) 337static int __devinit nuc900_soc_platform_probe(struct platform_device *pdev)
340{ 338{
341 return snd_soc_register_platform(&nuc900_soc_platform); 339 return snd_soc_register_platform(&pdev->dev, &nuc900_soc_platform);
342} 340}
343 341
344static void __exit nuc900_soc_platform_exit(void) 342static int __devexit nuc900_soc_platform_remove(struct platform_device *pdev)
345{ 343{
346 snd_soc_unregister_platform(&nuc900_soc_platform); 344 snd_soc_unregister_platform(&pdev->dev);
345 return 0;
347} 346}
348 347
349module_init(nuc900_soc_platform_init); 348static struct platform_driver nuc900_pcm_driver = {
350module_exit(nuc900_soc_platform_exit); 349 .driver = {
350 .name = "nuc900-pcm-audio",
351 .owner = THIS_MODULE,
352 },
353
354 .probe = nuc900_soc_platform_probe,
355 .remove = __devexit_p(nuc900_soc_platform_remove),
356};
357
358static int __init nuc900_pcm_init(void)
359{
360 return platform_driver_register(&nuc900_pcm_driver);
361}
362module_init(nuc900_pcm_init);
363
364static void __exit nuc900_pcm_exit(void)
365{
366 platform_driver_unregister(&nuc900_pcm_driver);
367}
368module_exit(nuc900_pcm_exit);
351 369
352MODULE_AUTHOR("Wan ZongShun, <mcuos.com@gmail.com>"); 370MODULE_AUTHOR("Wan ZongShun, <mcuos.com@gmail.com>");
353MODULE_DESCRIPTION("nuc900 Audio DMA module"); 371MODULE_DESCRIPTION("nuc900 Audio DMA module");