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.

see 24b5a82cf5709a4bc577f42fdaa61b23a7f58f08
spi: use platform_{get,set}_drvdata() for the upstream commit
that does this SPI subsystem wide.

Signed-off-by: Stefan Kristiansson <stefan.kristians...@saunalahti.fi>
---
 drivers/spi/spi-oc-simple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-oc-simple.c b/drivers/spi/spi-oc-simple.c
index 3938a26..4326107 100644
--- a/drivers/spi/spi-oc-simple.c
+++ b/drivers/spi/spi-oc-simple.c
@@ -399,7 +399,7 @@ static int ocspi_probe(struct platform_device *pdev)
        master->dev.of_node = pdev->dev.of_node;
 #endif
 
-       dev_set_drvdata(&pdev->dev, master);
+       platform_set_drvdata(pdev, master);
 
        spi = spi_master_get_devdata(master);
        spi->master = master;
@@ -439,7 +439,7 @@ static int ocspi_remove(struct platform_device *pdev)
        struct spi_master *master;
        struct ocspi *spi;
 
-       master = dev_get_drvdata(&pdev->dev);
+       master = platform_get_drvdata(pdev);
        spi = spi_master_get_devdata(master);
 
        spi_unregister_master(master);
-- 
1.8.1.2

_______________________________________________
Linux mailing list
Linux@lists.openrisc.net
http://lists.openrisc.net/listinfo/linux

Reply via email to