diff options
author | Sourav Poddar <sourav.poddar@ti.com> | 2013-12-20 07:52:57 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-31 07:55:59 -0500 |
commit | f17414c4fcf138740dbbd463171101026b6f78de (patch) | |
tree | 8757764e8aa7d4d3d831e2d760e503d484c651f3 /drivers/spi/spi-ti-qspi.c | |
parent | 374b105797c3d4f29c685f3be535c35f5689b30e (diff) |
spi/qspi: Fix runtime resume path
Due to the following commit
commit 160a061301c7adf54c40696e7ceedc73f6b747dd
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Date: Mon Nov 11 14:13:41 2013 +0800
spi/qspi: set correct platform drvdata in ti_qspi_probe()
The ti_qspi_remove() use the platform drvdata as a type of
struct ti_qspi, we should pass correct platform drvdata to
platform_set_drvdata() in ti_qspi_probe().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
platform_set_drvdata was changed in the probe, so we need to
correspondingly change deferencing of qspi in runtime resume
path. Else, this will lead to a NULL dereference pointer.
Based on v3.13-rc3
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-ti-qspi.c')
-rw-r--r-- | drivers/spi/spi-ti-qspi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 4396bd448540..06ee18956160 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c | |||
@@ -417,10 +417,8 @@ out: | |||
417 | static int ti_qspi_runtime_resume(struct device *dev) | 417 | static int ti_qspi_runtime_resume(struct device *dev) |
418 | { | 418 | { |
419 | struct ti_qspi *qspi; | 419 | struct ti_qspi *qspi; |
420 | struct spi_master *master; | ||
421 | 420 | ||
422 | master = dev_get_drvdata(dev); | 421 | qspi = dev_get_drvdata(dev); |
423 | qspi = spi_master_get_devdata(master); | ||
424 | ti_qspi_restore_ctx(qspi); | 422 | ti_qspi_restore_ctx(qspi); |
425 | 423 | ||
426 | return 0; | 424 | return 0; |