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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user