| From 83d6616d0c940be5181c2e0ea9840b493fe11162 Mon Sep 17 00:00:00 2001 |
| From: Jingoo Han <jg1.han@samsung.com> |
| Date: Thu, 23 May 2013 19:20:40 +0900 |
| Subject: spi: use platform_{get,set}_drvdata() |
| |
| 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 --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c |
| index 902f2fb902db..b44a6ac3cec9 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)); |
| -- |
| 1.8.5.rc3 |
| |