spi: atmel-quadspi: fix crash while suspending
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Wed, 24 Apr 2019 09:17:59 +0000 (09:17 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 2 May 2019 01:38:43 +0000 (10:38 +0900)
commite5c27498a0403b270620b1a8a0a66e3efc222fb6
treebd96161e2865f2d6465c38598ffcbab6602eda1a
parent8d1467a68426c61807c97163459b481ecb714523
spi: atmel-quadspi: fix crash while suspending

atmel_qspi objects are kept in spi_controller objects, so, first get
pointer to spi_controller object and then get atmel_qspi object from
spi_controller object.

Fixes: 2d30ac5ed633 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/atmel-quadspi.c