diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-26 11:21:02 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-26 11:21:02 -0400 |
commit | 3d09da11b59ade74502b246782552f9cb1eb59bd (patch) | |
tree | a5ac712ac7d7e5e2c76c813f32f9bdd9be6dc1b8 /drivers/spi/spi-ppc4xx.c | |
parent | 1728ddb2ca726b150e7bf10cdd35b5c3fc5efcf3 (diff) | |
parent | 24b5a82cf5709a4bc577f42fdaa61b23a7f58f08 (diff) |
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.c | 6 |
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) | |||
394 | if (master == NULL) | 394 | if (master == NULL) |
395 | return -ENOMEM; | 395 | return -ENOMEM; |
396 | master->dev.of_node = np; | 396 | master->dev.of_node = np; |
397 | dev_set_drvdata(dev, master); | 397 | platform_set_drvdata(op, master); |
398 | hw = spi_master_get_devdata(master); | 398 | hw = spi_master_get_devdata(master); |
399 | hw->master = spi_master_get(master); | 399 | hw->master = spi_master_get(master); |
400 | hw->dev = dev; | 400 | hw->dev = dev; |
@@ -542,7 +542,6 @@ request_mem_error: | |||
542 | free_gpios: | 542 | free_gpios: |
543 | free_gpios(hw); | 543 | free_gpios(hw); |
544 | free_master: | 544 | free_master: |
545 | dev_set_drvdata(dev, NULL); | ||
546 | spi_master_put(master); | 545 | spi_master_put(master); |
547 | 546 | ||
548 | dev_err(dev, "initialization failed\n"); | 547 | dev_err(dev, "initialization failed\n"); |
@@ -551,11 +550,10 @@ free_master: | |||
551 | 550 | ||
552 | static int spi_ppc4xx_of_remove(struct platform_device *op) | 551 | static int spi_ppc4xx_of_remove(struct platform_device *op) |
553 | { | 552 | { |
554 | struct spi_master *master = dev_get_drvdata(&op->dev); | 553 | struct spi_master *master = platform_get_drvdata(op); |
555 | struct ppc4xx_spi *hw = spi_master_get_devdata(master); | 554 | struct ppc4xx_spi *hw = spi_master_get_devdata(master); |
556 | 555 | ||
557 | spi_bitbang_stop(&hw->bitbang); | 556 | spi_bitbang_stop(&hw->bitbang); |
558 | dev_set_drvdata(&op->dev, NULL); | ||
559 | release_mem_region(hw->mapbase, hw->mapsize); | 557 | release_mem_region(hw->mapbase, hw->mapsize); |
560 | free_irq(hw->irqnum, hw); | 558 | free_irq(hw->irqnum, hw); |
561 | iounmap(hw->regs); | 559 | iounmap(hw->regs); |