diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-10-21 22:00:45 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-05 11:54:50 +0000 |
commit | be0bf62e3df9afcb3f7a72de347770568dd60af6 (patch) | |
tree | ebc422c97c6de7e218ca7c712753cda7c2f2d695 /drivers/spi/spi-rspi.c | |
parent | 6eee6d317aa2511ea86c4f8f28d79bfd3d621826 (diff) | |
download | linux-be0bf62e3df9afcb3f7a72de347770568dd60af6.tar.bz2 |
spi: spi-rspi: simplify getting .driver_data
We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-rspi.c')
-rw-r--r-- | drivers/spi/spi-rspi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 55f8e55327b3..a4ef641b5227 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -1347,16 +1347,14 @@ MODULE_DEVICE_TABLE(platform, spi_driver_ids); #ifdef CONFIG_PM_SLEEP static int rspi_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct rspi_data *rspi = platform_get_drvdata(pdev); + struct rspi_data *rspi = dev_get_drvdata(dev); return spi_master_suspend(rspi->master); } static int rspi_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct rspi_data *rspi = platform_get_drvdata(pdev); + struct rspi_data *rspi = dev_get_drvdata(dev); return spi_master_resume(rspi->master); } |