summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-ppc4xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-06-26 17:21:02 +0200
committerMark Brown <broonie@linaro.org>2013-06-26 17:21:02 +0200
commit3d09da11b59ade74502b246782552f9cb1eb59bd (patch)
treea5ac712ac7d7e5e2c76c813f32f9bdd9be6dc1b8 /drivers/spi/spi-ppc4xx.c
parentMerge remote-tracking branch 'spi/topic/omap' into spi-next (diff)
parentspi: use platform_{get,set}_drvdata() (diff)
downloadlinux-3d09da11b59ade74502b246782552f9cb1eb59bd.tar.xz
linux-3d09da11b59ade74502b246782552f9cb1eb59bd.zip
Merge remote-tracking branch 'spi/topic/pdata' into spi-next
Diffstat (limited to 'drivers/spi/spi-ppc4xx.c')
-rw-r--r--drivers/spi/spi-ppc4xx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c
index 01df34bed2d0..0ee53c25ba58 100644
--- a/drivers/spi/spi-ppc4xx.c
+++ b/drivers/spi/spi-ppc4xx.c
@@ -394,7 +394,7 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
if (master == NULL)
return -ENOMEM;
master->dev.of_node = np;
- dev_set_drvdata(dev, master);
+ platform_set_drvdata(op, master);
hw = spi_master_get_devdata(master);
hw->master = spi_master_get(master);
hw->dev = dev;
@@ -542,7 +542,6 @@ request_mem_error:
free_gpios:
free_gpios(hw);
free_master:
- dev_set_drvdata(dev, NULL);
spi_master_put(master);
dev_err(dev, "initialization failed\n");
@@ -551,11 +550,10 @@ free_master:
static int spi_ppc4xx_of_remove(struct platform_device *op)
{
- struct spi_master *master = dev_get_drvdata(&op->dev);
+ struct spi_master *master = platform_get_drvdata(op);
struct ppc4xx_spi *hw = spi_master_get_devdata(master);
spi_bitbang_stop(&hw->bitbang);
- dev_set_drvdata(&op->dev, NULL);
release_mem_region(hw->mapbase, hw->mapsize);
free_irq(hw->irqnum, hw);
iounmap(hw->regs);