mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
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: 31fb632b5d
("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>
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user