summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-mxs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-mxs.c')
-rw-r--r--drivers/spi/spi-mxs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 4e7801dd571a..10d34ebe9ca3 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -586,7 +586,6 @@ static int __devinit mxs_spi_probe(struct platform_device *pdev)
return 0;
out_free_dma:
- platform_set_drvdata(pdev, NULL);
dma_release_channel(ssp->dmach);
clk_disable_unprepare(ssp->clk);
out_master_free:
@@ -600,14 +599,12 @@ static int __devexit mxs_spi_remove(struct platform_device *pdev)
struct mxs_spi *spi;
struct mxs_ssp *ssp;
- master = platform_get_drvdata(pdev);
+ master = spi_master_get(platform_get_drvdata(pdev));
spi = spi_master_get_devdata(master);
ssp = &spi->ssp;
spi_unregister_master(master);
- platform_set_drvdata(pdev, NULL);
-
dma_release_channel(ssp->dmach);
clk_disable_unprepare(ssp->clk);