X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=drivers%2Fspi%2Fspi-ppc4xx.c;h=0ee53c25ba58b5d772633e4736f5c2bbbaf72ab4;hb=d3a33a9500f262a40fcf3a9b9b9c3e03890b14dd;hp=01df34bed2d0c7668339a7b8a570460d1b0b8b1f;hpb=95e40cc528dc7410a7d5883c9144264601b11e7c;p=deliverable%2Flinux.git 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);