spi: cadence: set cqspi to the driver_data field of struct device
authorMeng Li <Meng.Li@windriver.com>
Thu, 11 Mar 2021 09:12:20 +0000 (17:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Mar 2021 08:04:04 +0000 (09:04 +0100)
commit422806f8d2893393bf1bf2519f25509850cd2213
tree931fa8e64a99758f91132a07b9f79c68e54ad960
parentf8d5ced57b07215b2133ea5deba98d0646318e97
spi: cadence: set cqspi to the driver_data field of struct device

commit ea94191e584b146878f0b7fd4b767500d7aae870 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-cadence-quadspi.c