aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2014-05-20 23:22:18 -0400
committerMark Brown <broonie@linaro.org>2014-05-21 19:20:11 -0400
commit55313bd3b09b68ce28e328e9dde79bfc389ea921 (patch)
tree323c56ef84abeca57625a853d77c1811b7122db8
parentc583883ecdca277c258c95dc8c711dfb76d23b40 (diff)
ASoC: samsung: Use devm_snd_soc_register_platform
Replaced snd_soc_register_platform with devm_snd_soc_register_platform in samsung_asoc_dma_platform_register(). This makes the function samsung_asoc_dma_platform_unregister() redundant. This is removed and all its users are updated. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/samsung/ac97.c1
-rw-r--r--sound/soc/samsung/dma.c8
-rw-r--r--sound/soc/samsung/dma.h1
-rw-r--r--sound/soc/samsung/dmaengine.c13
-rw-r--r--sound/soc/samsung/i2s.c2
-rw-r--r--sound/soc/samsung/idma.c9
-rw-r--r--sound/soc/samsung/pcm.c1
-rw-r--r--sound/soc/samsung/s3c2412-i2s.c1
-rw-r--r--sound/soc/samsung/s3c24xx-i2s.c1
-rw-r--r--sound/soc/samsung/spdif.c1
10 files changed, 6 insertions, 32 deletions
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 76b072bd4ba2..fbce03bbdb2b 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -461,7 +461,6 @@ static int s3c_ac97_remove(struct platform_device *pdev)
461{ 461{
462 struct resource *irq_res; 462 struct resource *irq_res;
463 463
464 samsung_asoc_dma_platform_unregister(&pdev->dev);
465 snd_soc_unregister_component(&pdev->dev); 464 snd_soc_unregister_component(&pdev->dev);
466 465
467 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 466 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index dc09b71b7d9f..d9dc7bcc0336 100644
--- a/sound/soc/samsung/dma.c
+++ b/sound/soc/samsung/dma.c
@@ -445,16 +445,10 @@ EXPORT_SYMBOL_GPL(samsung_asoc_init_dma_data);
445 445
446int samsung_asoc_dma_platform_register(struct device *dev) 446int samsung_asoc_dma_platform_register(struct device *dev)
447{ 447{
448 return snd_soc_register_platform(dev, &samsung_asoc_platform); 448 return devm_snd_soc_register_platform(dev, &samsung_asoc_platform);
449} 449}
450EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_register); 450EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_register);
451 451
452void samsung_asoc_dma_platform_unregister(struct device *dev)
453{
454 snd_soc_unregister_platform(dev);
455}
456EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_unregister);
457
458MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); 452MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
459MODULE_DESCRIPTION("Samsung ASoC DMA Driver"); 453MODULE_DESCRIPTION("Samsung ASoC DMA Driver");
460MODULE_LICENSE("GPL"); 454MODULE_LICENSE("GPL");
diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h
index ad7c0f04f00d..070ab0f09609 100644
--- a/sound/soc/samsung/dma.h
+++ b/sound/soc/samsung/dma.h
@@ -33,6 +33,5 @@ void samsung_asoc_init_dma_data(struct snd_soc_dai *dai,
33 struct s3c_dma_params *playback, 33 struct s3c_dma_params *playback,
34 struct s3c_dma_params *capture); 34 struct s3c_dma_params *capture);
35int samsung_asoc_dma_platform_register(struct device *dev); 35int samsung_asoc_dma_platform_register(struct device *dev);
36void samsung_asoc_dma_platform_unregister(struct device *dev);
37 36
38#endif 37#endif
diff --git a/sound/soc/samsung/dmaengine.c b/sound/soc/samsung/dmaengine.c
index 750ce5808d9f..a0e4e7948909 100644
--- a/sound/soc/samsung/dmaengine.c
+++ b/sound/soc/samsung/dmaengine.c
@@ -66,18 +66,13 @@ EXPORT_SYMBOL_GPL(samsung_asoc_init_dma_data);
66 66
67int samsung_asoc_dma_platform_register(struct device *dev) 67int samsung_asoc_dma_platform_register(struct device *dev)
68{ 68{
69 return snd_dmaengine_pcm_register(dev, &samsung_dmaengine_pcm_config, 69 return devm_snd_dmaengine_pcm_register(dev,
70 SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME | 70 &samsung_dmaengine_pcm_config,
71 SND_DMAENGINE_PCM_FLAG_COMPAT); 71 SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME |
72 SND_DMAENGINE_PCM_FLAG_COMPAT);
72} 73}
73EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_register); 74EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_register);
74 75
75void samsung_asoc_dma_platform_unregister(struct device *dev)
76{
77 return snd_dmaengine_pcm_unregister(dev);
78}
79EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_unregister);
80
81MODULE_AUTHOR("Mark Brown <broonie@linaro.org>"); 76MODULE_AUTHOR("Mark Brown <broonie@linaro.org>");
82MODULE_DESCRIPTION("Samsung dmaengine ASoC driver"); 77MODULE_DESCRIPTION("Samsung dmaengine ASoC driver");
83MODULE_LICENSE("GPL"); 78MODULE_LICENSE("GPL");
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 1e99071fb624..07ff3e7cb890 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1295,8 +1295,6 @@ static int samsung_i2s_remove(struct platform_device *pdev)
1295 i2s->pri_dai = NULL; 1295 i2s->pri_dai = NULL;
1296 i2s->sec_dai = NULL; 1296 i2s->sec_dai = NULL;
1297 1297
1298 samsung_asoc_dma_platform_unregister(&pdev->dev);
1299
1300 return 0; 1298 return 0;
1301} 1299}
1302 1300
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
index e9891b44f0e2..8cc5770abb39 100644
--- a/sound/soc/samsung/idma.c
+++ b/sound/soc/samsung/idma.c
@@ -413,13 +413,7 @@ static int asoc_idma_platform_probe(struct platform_device *pdev)
413 if (idma_irq < 0) 413 if (idma_irq < 0)
414 return idma_irq; 414 return idma_irq;
415 415
416 return snd_soc_register_platform(&pdev->dev, &asoc_idma_platform); 416 return devm_snd_soc_register_platform(&pdev->dev, &asoc_idma_platform);
417}
418
419static int asoc_idma_platform_remove(struct platform_device *pdev)
420{
421 snd_soc_unregister_platform(&pdev->dev);
422 return 0;
423} 417}
424 418
425static struct platform_driver asoc_idma_driver = { 419static struct platform_driver asoc_idma_driver = {
@@ -429,7 +423,6 @@ static struct platform_driver asoc_idma_driver = {
429 }, 423 },
430 424
431 .probe = asoc_idma_platform_probe, 425 .probe = asoc_idma_platform_probe,
432 .remove = asoc_idma_platform_remove,
433}; 426};
434 427
435module_platform_driver(asoc_idma_driver); 428module_platform_driver(asoc_idma_driver);
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index ab54e297957c..38df2a86bd5f 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -624,7 +624,6 @@ static int s3c_pcm_dev_remove(struct platform_device *pdev)
624 struct s3c_pcm_info *pcm = &s3c_pcm[pdev->id]; 624 struct s3c_pcm_info *pcm = &s3c_pcm[pdev->id];
625 struct resource *mem_res; 625 struct resource *mem_res;
626 626
627 samsung_asoc_dma_platform_unregister(&pdev->dev);
628 snd_soc_unregister_component(&pdev->dev); 627 snd_soc_unregister_component(&pdev->dev);
629 628
630 pm_runtime_disable(&pdev->dev); 629 pm_runtime_disable(&pdev->dev);
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index e9bb5d7a71ee..f42da8df3e3c 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -192,7 +192,6 @@ err:
192 192
193static int s3c2412_iis_dev_remove(struct platform_device *pdev) 193static int s3c2412_iis_dev_remove(struct platform_device *pdev)
194{ 194{
195 samsung_asoc_dma_platform_unregister(&pdev->dev);
196 snd_soc_unregister_component(&pdev->dev); 195 snd_soc_unregister_component(&pdev->dev);
197 return 0; 196 return 0;
198} 197}
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index d7b8457b5650..8380443b1b39 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -496,7 +496,6 @@ err:
496 496
497static int s3c24xx_iis_dev_remove(struct platform_device *pdev) 497static int s3c24xx_iis_dev_remove(struct platform_device *pdev)
498{ 498{
499 samsung_asoc_dma_platform_unregister(&pdev->dev);
500 snd_soc_unregister_component(&pdev->dev); 499 snd_soc_unregister_component(&pdev->dev);
501 return 0; 500 return 0;
502} 501}
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index cfe63b7bcc9f..7d89d016fa49 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -467,7 +467,6 @@ static int spdif_remove(struct platform_device *pdev)
467 struct samsung_spdif_info *spdif = &spdif_info; 467 struct samsung_spdif_info *spdif = &spdif_info;
468 struct resource *mem_res; 468 struct resource *mem_res;
469 469
470 samsung_asoc_dma_platform_unregister(&pdev->dev);
471 snd_soc_unregister_component(&pdev->dev); 470 snd_soc_unregister_component(&pdev->dev);
472 471
473 iounmap(spdif->regs); 472 iounmap(spdif->regs);