diff mbox

[208/237] spi: use platform_{get,set}_drvdata()

Message ID 1387000406-29111-209-git-send-email-horms+renesas@verge.net.au (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Horman Dec. 14, 2013, 5:52 a.m. UTC
From: Jingoo Han <jg1.han@samsung.com>

Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 24b5a82cf5709a4bc577f42fdaa61b23a7f58f08)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Conflicts:
	drivers/spi/spi-davinci.c
	drivers/spi/spi-fsl-spi.c
	drivers/spi/spi-mpc52xx-psc.c
	drivers/spi/spi-mpc52xx.c
	drivers/spi/spi-omap-100k.c
	drivers/spi/spi-omap-uwire.c
	drivers/spi/spi-omap2-mcspi.c
	drivers/spi/spi-orion.c
	drivers/spi/spi-ppc4xx.c
	drivers/spi/spi-sh-hspi.c
	drivers/spi/spi-sh.c
	drivers/spi/spi-tegra114.c
	drivers/spi/spi-tegra20-sflash.c
	drivers/spi/spi-tegra20-slink.c
---
 drivers/spi/spi-rspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 902f2fb..b44a6ac 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -719,7 +719,7 @@  static void rspi_release_dma(struct rspi_data *rspi)
 
 static int rspi_remove(struct platform_device *pdev)
 {
-	struct rspi_data *rspi = dev_get_drvdata(&pdev->dev);
+	struct rspi_data *rspi = platform_get_drvdata(pdev);
 
 	spi_unregister_master(rspi->master);
 	rspi_release_dma(rspi);
@@ -759,7 +759,7 @@  static int rspi_probe(struct platform_device *pdev)
 	}
 
 	rspi = spi_master_get_devdata(master);
-	dev_set_drvdata(&pdev->dev, rspi);
+	platform_set_drvdata(pdev, rspi);
 
 	rspi->master = master;
 	rspi->addr = ioremap(res->start, resource_size(res));