diff options
author | 2018-04-19 16:06:16 +0200 | |
---|---|---|
committer | 2018-04-20 17:53:20 +0100 | |
commit | e1f16b0493a01820a137ebbdd96bf695e427fabe (patch) | |
tree | 9559888068f86579f502c96cbadbaf307fb4e9d9 /drivers/spi/spi-zynqmp-gqspi.c | |
parent | spi: pxa2xx: Allow 64-bit DMA (diff) | |
download | linux-e1f16b0493a01820a137ebbdd96bf695e427fabe.tar.gz linux-e1f16b0493a01820a137ebbdd96bf695e427fabe.tar.bz2 linux-e1f16b0493a01820a137ebbdd96bf695e427fabe.zip |
spi: simplify getting .drvdata
We should get drvdata 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>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-zynqmp-gqspi.c')
-rw-r--r-- | drivers/spi/spi-zynqmp-gqspi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c index 26d1ac3bf496..cc4d31033494 100644 --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -906,8 +906,7 @@ static int zynqmp_qspi_start_transfer(struct spi_master *master, */ static int __maybe_unused zynqmp_qspi_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); spi_master_suspend(master); @@ -927,8 +926,7 @@ static int __maybe_unused zynqmp_qspi_suspend(struct device *dev) */ static int __maybe_unused zynqmp_qspi_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 zynqmp_qspi *xqspi = spi_master_get_devdata(master); int ret = 0; |