aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/mxs')
-rw-r--r--sound/soc/mxs/mxs-pcm.c8
-rw-r--r--sound/soc/mxs/mxs-pcm.h1
-rw-r--r--sound/soc/mxs/mxs-saif.c18
3 files changed, 6 insertions, 21 deletions
diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c
index b16abbbf7764..04a6b0d60944 100644
--- a/sound/soc/mxs/mxs-pcm.c
+++ b/sound/soc/mxs/mxs-pcm.c
@@ -56,16 +56,10 @@ static const struct snd_dmaengine_pcm_config mxs_dmaengine_pcm_config = {
56 56
57int mxs_pcm_platform_register(struct device *dev) 57int mxs_pcm_platform_register(struct device *dev)
58{ 58{
59 return snd_dmaengine_pcm_register(dev, &mxs_dmaengine_pcm_config, 59 return devm_snd_dmaengine_pcm_register(dev, &mxs_dmaengine_pcm_config,
60 SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | 60 SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
61 SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX); 61 SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX);
62} 62}
63EXPORT_SYMBOL_GPL(mxs_pcm_platform_register); 63EXPORT_SYMBOL_GPL(mxs_pcm_platform_register);
64 64
65void mxs_pcm_platform_unregister(struct device *dev)
66{
67 snd_dmaengine_pcm_unregister(dev);
68}
69EXPORT_SYMBOL_GPL(mxs_pcm_platform_unregister);
70
71MODULE_LICENSE("GPL"); 65MODULE_LICENSE("GPL");
diff --git a/sound/soc/mxs/mxs-pcm.h b/sound/soc/mxs/mxs-pcm.h
index bc685b67cac7..035ea0436ca5 100644
--- a/sound/soc/mxs/mxs-pcm.h
+++ b/sound/soc/mxs/mxs-pcm.h
@@ -20,6 +20,5 @@
20#define _MXS_PCM_H 20#define _MXS_PCM_H
21 21
22int mxs_pcm_platform_register(struct device *dev); 22int mxs_pcm_platform_register(struct device *dev);
23void mxs_pcm_platform_unregister(struct device *dev);
24 23
25#endif 24#endif
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 54e622acac33..231d7e7b0711 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -50,9 +50,9 @@ static struct mxs_saif *mxs_saif[2];
50 * This also means that both SAIFs must operate at the same sample rate. 50 * This also means that both SAIFs must operate at the same sample rate.
51 * 51 *
52 * We abstract this as each saif has a master, the master could be 52 * We abstract this as each saif has a master, the master could be
53 * himself or other saifs. In the generic saif driver, saif does not need 53 * itself or other saifs. In the generic saif driver, saif does not need
54 * to know the different clkmux. Saif only needs to know who is his master 54 * to know the different clkmux. Saif only needs to know who is its master
55 * and operating his master to generate the proper clock rate for him. 55 * and operating its master to generate the proper clock rate for it.
56 * The master id is provided in mach-specific layer according to different 56 * The master id is provided in mach-specific layer according to different
57 * clkmux setting. 57 * clkmux setting.
58 */ 58 */
@@ -76,7 +76,7 @@ static int mxs_saif_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
76 * Since SAIF may work on EXTMASTER mode, IOW, it's working BITCLK&LRCLK 76 * Since SAIF may work on EXTMASTER mode, IOW, it's working BITCLK&LRCLK
77 * is provided by other SAIF, we provide a interface here to get its master 77 * is provided by other SAIF, we provide a interface here to get its master
78 * from its master_id. 78 * from its master_id.
79 * Note that the master could be himself. 79 * Note that the master could be itself.
80 */ 80 */
81static inline struct mxs_saif *mxs_saif_get_master(struct mxs_saif * saif) 81static inline struct mxs_saif *mxs_saif_get_master(struct mxs_saif * saif)
82{ 82{
@@ -516,7 +516,7 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
516 } 516 }
517 517
518 /* 518 /*
519 * If the saif's master is not himself, we also need to enable 519 * If the saif's master is not itself, we also need to enable
520 * itself clk for its internal basic logic to work. 520 * itself clk for its internal basic logic to work.
521 */ 521 */
522 if (saif != master_saif) { 522 if (saif != master_saif) {
@@ -804,13 +804,6 @@ static int mxs_saif_probe(struct platform_device *pdev)
804 return 0; 804 return 0;
805} 805}
806 806
807static int mxs_saif_remove(struct platform_device *pdev)
808{
809 mxs_pcm_platform_unregister(&pdev->dev);
810
811 return 0;
812}
813
814static const struct of_device_id mxs_saif_dt_ids[] = { 807static const struct of_device_id mxs_saif_dt_ids[] = {
815 { .compatible = "fsl,imx28-saif", }, 808 { .compatible = "fsl,imx28-saif", },
816 { /* sentinel */ } 809 { /* sentinel */ }
@@ -819,7 +812,6 @@ MODULE_DEVICE_TABLE(of, mxs_saif_dt_ids);
819 812
820static struct platform_driver mxs_saif_driver = { 813static struct platform_driver mxs_saif_driver = {
821 .probe = mxs_saif_probe, 814 .probe = mxs_saif_probe,
822 .remove = mxs_saif_remove,
823 815
824 .driver = { 816 .driver = {
825 .name = "mxs-saif", 817 .name = "mxs-saif",