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>
This commit is contained in:
Jingoo Han 2013-05-23 19:20:40 +09:00 committed by Mark Brown
parent c7788792a5
commit 24b5a82cf5
15 changed files with 28 additions and 30 deletions

View file

@ -865,7 +865,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
goto err;
}
dev_set_drvdata(&pdev->dev, master);
platform_set_drvdata(pdev, master);
dspi = spi_master_get_devdata(master);
if (dspi == NULL) {
@ -1044,7 +1044,7 @@ static int davinci_spi_remove(struct platform_device *pdev)
struct spi_master *master;
struct resource *r;
master = dev_get_drvdata(&pdev->dev);
master = platform_get_drvdata(pdev);
dspi = spi_master_get_devdata(master);
spi_bitbang_stop(&dspi->bitbang);