summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_ssi.c
diff options
context:
space:
mode:
authorFabio Estevam2013-08-17 23:13:00 +0200
committerMark Brown2013-08-20 12:47:04 +0200
commit0783e648988a2ccef6eac9b1c376e7832e09cd94 (patch)
tree3312f0cae5972ddef3c9cc6c29873123f53b4ece /sound/soc/fsl/fsl_ssi.c
parentASoC: imx: Add MODULE_LICENSE to DMA drivers (diff)
downloadkernel-qcow2-linux-0783e648988a2ccef6eac9b1c376e7832e09cd94.tar.gz
kernel-qcow2-linux-0783e648988a2ccef6eac9b1c376e7832e09cd94.tar.xz
kernel-qcow2-linux-0783e648988a2ccef6eac9b1c376e7832e09cd94.zip
ASoC: fsl: fsl_ssi: Fix the order of resources removal
In fsl_ssi_remove() we need to remove the resources in the opposite order that they were acquired in probe. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r--sound/soc/fsl/fsl_ssi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 0c072ff10875..3168998dcf1d 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -928,14 +928,14 @@ static int fsl_ssi_remove(struct platform_device *pdev)
if (!ssi_private->new_binding)
platform_device_unregister(ssi_private->pdev);
- if (ssi_private->ssi_on_imx) {
+ if (ssi_private->ssi_on_imx)
imx_pcm_dma_exit(pdev);
- clk_disable_unprepare(ssi_private->clk);
- }
snd_soc_unregister_component(&pdev->dev);
+ dev_set_drvdata(&pdev->dev, NULL);
device_remove_file(&pdev->dev, &ssi_private->dev_attr);
+ if (ssi_private->ssi_on_imx)
+ clk_disable_unprepare(ssi_private->clk);
irq_dispose_mapping(ssi_private->irq);
- dev_set_drvdata(&pdev->dev, NULL);
return 0;
}