diff options
author | Meng Li <Meng.Li@windriver.com> | 2021-03-11 10:12:20 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-11 14:32:32 +0100 |
commit | ea94191e584b146878f0b7fd4b767500d7aae870 (patch) | |
tree | bf71e338029941281fc5210634c1a99377314511 /drivers/spi | |
parent | Merge series "ASoC: sdm845: array out of bound issues" from Srinivas Kandagat... (diff) | |
download | linux-ea94191e584b146878f0b7fd4b767500d7aae870.tar.xz linux-ea94191e584b146878f0b7fd4b767500d7aae870.zip |
spi: cadence: set cqspi to the driver_data field of struct device
When initialize cadence qspi controller, it is need to set cqspi
to the driver_data field of struct device, because it will be
used in function cqspi_remove/suspend/resume(). Otherwise, there
will be a crash trace as below when invoking these finctions.
Fixes: 31fb632b5d43 ("spi: Move cadence-quadspi driver to drivers/spi/")
Cc: stable@vger.kernel.org
Signed-off-by: Meng Li <Meng.Li@windriver.com>
Link: https://lore.kernel.org/r/20210311091220.3615-1-Meng.Li@windriver.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-cadence-quadspi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 442cc7c53a47..52ddb3255d88 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1433,6 +1433,7 @@ static int cqspi_probe(struct platform_device *pdev) cqspi = spi_master_get_devdata(master); cqspi->pdev = pdev; + platform_set_drvdata(pdev, cqspi); /* Obtain configuration from OF. */ ret = cqspi_of_get_pdata(cqspi); |