diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-03-19 17:36:37 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-20 17:20:29 +0000 |
commit | f457cb707836e79a88b64ab22230edc2aa8ce0af (patch) | |
tree | cb8eac8f0cd39ecda813a80cca8e0dbb5ae3c362 /drivers/spi | |
parent | 43a8d240eee4f523c7120f47a4c9469f5abfb308 (diff) | |
download | linux-f457cb707836e79a88b64ab22230edc2aa8ce0af.tar.gz linux-f457cb707836e79a88b64ab22230edc2aa8ce0af.tar.bz2 linux-f457cb707836e79a88b64ab22230edc2aa8ce0af.zip |
spi: mxic: 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')
-rw-r--r-- | drivers/spi/spi-mxic.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c index e41ae6ef0f8a..f48563c09b97 100644 --- a/drivers/spi/spi-mxic.c +++ b/drivers/spi/spi-mxic.c @@ -492,8 +492,7 @@ static int mxic_spi_transfer_one(struct spi_master *master, static int __maybe_unused mxic_spi_runtime_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct spi_master *master = platform_get_drvdata(pdev); + struct spi_master *master = dev_get_drvdata(dev); struct mxic_spi *mxic = spi_master_get_devdata(master); mxic_spi_clk_disable(mxic); @@ -504,8 +503,7 @@ static int __maybe_unused mxic_spi_runtime_suspend(struct device *dev) static int __maybe_unused mxic_spi_runtime_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct spi_master *master = platform_get_drvdata(pdev); + struct spi_master *master = dev_get_drvdata(dev); struct mxic_spi *mxic = spi_master_get_devdata(master); int ret; |