summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-ppc4xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-06-26 16:21:02 +0100
committerMark Brown <broonie@linaro.org>2013-06-26 16:21:02 +0100
commit3d09da11b59ade74502b246782552f9cb1eb59bd (patch)
treea5ac712ac7d7e5e2c76c813f32f9bdd9be6dc1b8 /drivers/spi/spi-ppc4xx.c
parent1728ddb2ca726b150e7bf10cdd35b5c3fc5efcf3 (diff)
parent24b5a82cf5709a4bc577f42fdaa61b23a7f58f08 (diff)
downloadop-kernel-dev-3d09da11b59ade74502b246782552f9cb1eb59bd.zip
op-kernel-dev-3d09da11b59ade74502b246782552f9cb1eb59bd.tar.gz
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 01df34b..0ee53c2 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);
OpenPOWER on IntegriCloud