diff options
Diffstat (limited to 'sound/soc/tegra/tegra_pcm.c')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 8b4457137c7c..127348dc09b1 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * tegra_pcm.c - Tegra PCM driver | 2 | * tegra_pcm.c - Tegra PCM driver |
3 | * | 3 | * |
4 | * Author: Stephen Warren <swarren@nvidia.com> | 4 | * Author: Stephen Warren <swarren@nvidia.com> |
5 | * Copyright (C) 2010 - NVIDIA, Inc. | 5 | * Copyright (C) 2010,2012 - NVIDIA, Inc. |
6 | * | 6 | * |
7 | * Based on code copyright/by: | 7 | * Based on code copyright/by: |
8 | * | 8 | * |
@@ -29,8 +29,8 @@ | |||
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/module.h> | ||
33 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/module.h> | ||
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
@@ -39,8 +39,6 @@ | |||
39 | 39 | ||
40 | #include "tegra_pcm.h" | 40 | #include "tegra_pcm.h" |
41 | 41 | ||
42 | #define DRV_NAME "tegra-pcm-audio" | ||
43 | |||
44 | static const struct snd_pcm_hardware tegra_pcm_hardware = { | 42 | static const struct snd_pcm_hardware tegra_pcm_hardware = { |
45 | .info = SNDRV_PCM_INFO_MMAP | | 43 | .info = SNDRV_PCM_INFO_MMAP | |
46 | SNDRV_PCM_INFO_MMAP_VALID | | 44 | SNDRV_PCM_INFO_MMAP_VALID | |
@@ -372,28 +370,18 @@ static struct snd_soc_platform_driver tegra_pcm_platform = { | |||
372 | .pcm_free = tegra_pcm_free, | 370 | .pcm_free = tegra_pcm_free, |
373 | }; | 371 | }; |
374 | 372 | ||
375 | static int __devinit tegra_pcm_platform_probe(struct platform_device *pdev) | 373 | int __devinit tegra_pcm_platform_register(struct device *dev) |
376 | { | 374 | { |
377 | return snd_soc_register_platform(&pdev->dev, &tegra_pcm_platform); | 375 | return snd_soc_register_platform(dev, &tegra_pcm_platform); |
378 | } | 376 | } |
377 | EXPORT_SYMBOL_GPL(tegra_pcm_platform_register); | ||
379 | 378 | ||
380 | static int __devexit tegra_pcm_platform_remove(struct platform_device *pdev) | 379 | void __devexit tegra_pcm_platform_unregister(struct device *dev) |
381 | { | 380 | { |
382 | snd_soc_unregister_platform(&pdev->dev); | 381 | snd_soc_unregister_platform(dev); |
383 | return 0; | ||
384 | } | 382 | } |
385 | 383 | EXPORT_SYMBOL_GPL(tegra_pcm_platform_unregister); | |
386 | static struct platform_driver tegra_pcm_driver = { | ||
387 | .driver = { | ||
388 | .name = DRV_NAME, | ||
389 | .owner = THIS_MODULE, | ||
390 | }, | ||
391 | .probe = tegra_pcm_platform_probe, | ||
392 | .remove = __devexit_p(tegra_pcm_platform_remove), | ||
393 | }; | ||
394 | module_platform_driver(tegra_pcm_driver); | ||
395 | 384 | ||
396 | MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); | 385 | MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); |
397 | MODULE_DESCRIPTION("Tegra PCM ASoC driver"); | 386 | MODULE_DESCRIPTION("Tegra PCM ASoC driver"); |
398 | MODULE_LICENSE("GPL"); | 387 | MODULE_LICENSE("GPL"); |
399 | MODULE_ALIAS("platform:" DRV_NAME); | ||