* [PATCH] spi: ti-qspi: Fix getting correct address for qspi
@ 2014-01-07 8:25 Axel Lin
0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2014-01-07 8:25 UTC (permalink / raw)
To: Mark Brown; +Cc: Sourav Poddar, linux-spi-u79uwXL29TY76Z2rM5mHXA
platform_get_drvdata() returns the address of qspi rather than master.
Also drop unneeded spi_unregister_master() call in ti_qspi_remove() because
we use devm_spi_register_master() in probe.
Fixes: f17414c4fcf1 (spi/qspi: set correct platform drvdata in ti_qspi_probe())
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/spi/spi-ti-qspi.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 9190e03..4b413e9 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -563,13 +563,9 @@ free_master:
static int ti_qspi_remove(struct platform_device *pdev)
{
- struct spi_master *master;
- struct ti_qspi *qspi;
+ struct ti_qspi *qspi = platform_get_drvdata(pdev);
int ret;
- master = platform_get_drvdata(pdev);
- qspi = spi_master_get_devdata(master);
-
ret = pm_runtime_get_sync(qspi->dev);
if (ret < 0) {
dev_err(qspi->dev, "pm_runtime_get_sync() failed\n");
@@ -581,8 +577,6 @@ static int ti_qspi_remove(struct platform_device *pdev)
pm_runtime_put(qspi->dev);
pm_runtime_disable(&pdev->dev);
- spi_unregister_master(master);
-
return 0;
}
--
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] only message in thread
only message in thread, other threads:[~2014-01-07 8:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 8:25 [PATCH] spi: ti-qspi: Fix getting correct address for qspi Axel Lin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.