Commit ea94191e authored by Meng Li's avatar Meng Li Committed by Mark Brown

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: 31fb632b ("spi: Move cadence-quadspi driver to drivers/spi/")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMeng Li <Meng.Li@windriver.com>
Link: https://lore.kernel.org/r/20210311091220.3615-1-Meng.Li@windriver.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e92a309b
...@@ -1433,6 +1433,7 @@ static int cqspi_probe(struct platform_device *pdev) ...@@ -1433,6 +1433,7 @@ static int cqspi_probe(struct platform_device *pdev)
cqspi = spi_master_get_devdata(master); cqspi = spi_master_get_devdata(master);
cqspi->pdev = pdev; cqspi->pdev = pdev;
platform_set_drvdata(pdev, cqspi);
/* Obtain configuration from OF. */ /* Obtain configuration from OF. */
ret = cqspi_of_get_pdata(cqspi); ret = cqspi_of_get_pdata(cqspi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment