spi: spi-zynqmp-gqspi: 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>
This commit is contained in:
Родитель
07c7df3ecd
Коммит
6eee6d317a
|
@ -960,8 +960,7 @@ static int __maybe_unused zynqmp_qspi_resume(struct device *dev)
|
|||
*/
|
||||
static int __maybe_unused zynqmp_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 zynqmp_qspi *xqspi = spi_master_get_devdata(master);
|
||||
|
||||
clk_disable(xqspi->refclk);
|
||||
|
@ -980,8 +979,7 @@ static int __maybe_unused zynqmp_runtime_suspend(struct device *dev)
|
|||
*/
|
||||
static int __maybe_unused zynqmp_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 zynqmp_qspi *xqspi = spi_master_get_devdata(master);
|
||||
int ret;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче