spi: coldfire-qspi: Fix getting correct address for *mcfqspi
dev_get_drvdata() returns the address of master rather than mcfqspi.
Fixes: af361079
(spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
This commit is contained in:
parent
38dbfb59d1
commit
ee73b4c6e3
|
@ -514,7 +514,8 @@ static int mcfqspi_resume(struct device *dev)
|
||||||
#ifdef CONFIG_PM_RUNTIME
|
#ifdef CONFIG_PM_RUNTIME
|
||||||
static int mcfqspi_runtime_suspend(struct device *dev)
|
static int mcfqspi_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct mcfqspi *mcfqspi = dev_get_drvdata(dev);
|
struct spi_master *master = dev_get_drvdata(dev);
|
||||||
|
struct mcfqspi *mcfqspi = spi_master_get_devdata(master);
|
||||||
|
|
||||||
clk_disable(mcfqspi->clk);
|
clk_disable(mcfqspi->clk);
|
||||||
|
|
||||||
|
@ -523,7 +524,8 @@ static int mcfqspi_runtime_suspend(struct device *dev)
|
||||||
|
|
||||||
static int mcfqspi_runtime_resume(struct device *dev)
|
static int mcfqspi_runtime_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct mcfqspi *mcfqspi = dev_get_drvdata(dev);
|
struct spi_master *master = dev_get_drvdata(dev);
|
||||||
|
struct mcfqspi *mcfqspi = spi_master_get_devdata(master);
|
||||||
|
|
||||||
clk_enable(mcfqspi->clk);
|
clk_enable(mcfqspi->clk);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue