linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] spi: coldfire-qspi: Fix getting correct address for *mcfqspi
@ 2014-02-14  1:53 Axel Lin
  2014-02-14  1:54 ` [PATCH 2/3] spi: coldfire-qspi: Remove unused dev field from struct mcfqspi Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Axel Lin @ 2014-02-14  1:53 UTC (permalink / raw)
  To: Mark Brown; +Cc: Steven King, linux-spi-u79uwXL29TY76Z2rM5mHXA

dev_get_drvdata() returns the address of master rather than mcfqspi.

Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
 drivers/spi/spi-coldfire-qspi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index 0ab2c55..8e4f1c9c 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -508,7 +508,8 @@ static int mcfqspi_resume(struct device *dev)
 #ifdef CONFIG_PM_RUNTIME
 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);
 
@@ -517,7 +518,8 @@ static int mcfqspi_runtime_suspend(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);
 
-- 
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-23  4:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-14  1:53 [PATCH 1/3] spi: coldfire-qspi: Fix getting correct address for *mcfqspi Axel Lin
2014-02-14  1:54 ` [PATCH 2/3] spi: coldfire-qspi: Remove unused dev field from struct mcfqspi Axel Lin
2014-02-14  1:55 ` [RFT][PATCH 3/3] spi: coldfire-qspi: Use core message handling Axel Lin
2014-02-23  4:10 ` [PATCH 1/3] spi: coldfire-qspi: Fix getting correct address for *mcfqspi Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).