aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/fsl_dma.c')
-rw-r--r--sound/soc/fsl/fsl_dma.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 4450f9d845c6..57774cb91ae3 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -57,7 +57,6 @@
57 SNDRV_PCM_RATE_CONTINUOUS) 57 SNDRV_PCM_RATE_CONTINUOUS)
58 58
59struct dma_object { 59struct dma_object {
60 struct list_head list;
61 struct snd_soc_platform_driver dai; 60 struct snd_soc_platform_driver dai;
62 dma_addr_t ssi_stx_phys; 61 dma_addr_t ssi_stx_phys;
63 dma_addr_t ssi_srx_phys; 62 dma_addr_t ssi_srx_phys;
@@ -825,9 +824,6 @@ static void fsl_dma_free_dma_buffers(struct snd_pcm *pcm)
825 } 824 }
826} 825}
827 826
828/* List of DMA nodes that we've probed */
829static LIST_HEAD(dma_list);
830
831/** 827/**
832 * find_ssi_node -- returns the SSI node that points to his DMA channel node 828 * find_ssi_node -- returns the SSI node that points to his DMA channel node
833 * 829 *
@@ -915,25 +911,20 @@ static int __devinit fsl_soc_dma_probe(struct of_device *of_dev,
915 911
916 dma->channel = of_iomap(np, 0); 912 dma->channel = of_iomap(np, 0);
917 dma->irq = irq_of_parse_and_map(np, 0); 913 dma->irq = irq_of_parse_and_map(np, 0);
918 list_add(&dma->list, &dma_list); 914
915 dev_set_drvdata(&of_dev->dev, dma);
919 916
920 return 0; 917 return 0;
921} 918}
922 919
923static int __devexit fsl_soc_dma_remove(struct of_device *of_dev) 920static int __devexit fsl_soc_dma_remove(struct of_device *of_dev)
924{ 921{
925 struct list_head *n, *ptr; 922 struct dma_object *dma = dev_get_drvdata(&of_dev->dev);
926 struct dma_object *dma;
927 923
928 list_for_each_safe(ptr, n, &dma_list) { 924 snd_soc_unregister_platform(&of_dev->dev);
929 dma = list_entry(ptr, struct dma_object, list); 925 iounmap(dma->channel);
930 list_del_init(ptr); 926 irq_dispose_mapping(dma->irq);
931 927 kfree(dma);
932 snd_soc_unregister_platform(&of_dev->dev);
933 iounmap(dma->channel);
934 irq_dispose_mapping(dma->irq);
935 kfree(dma);
936 }
937 928
938 return 0; 929 return 0;
939} 930}