dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SPI: meson-spifc add missed calls to remove function
@ 2021-04-23  3:42 Artem Lapkin
  2021-04-23 11:47 ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Artem Lapkin @ 2021-04-23  3:42 UTC (permalink / raw)
  To: narmstrong
  Cc: gouwa, martin.blumenstingl, khilman, christianshewitt,
	linux-kernel, dri-devel, linux-spi, broonie, nick, linux-amlogic,
	art, linux-arm-kernel, jbrunet

Problem: rmmod meson_gx_mmc - not stable without spi_master_suspend call
and we can get stuck when try unload this module

rmmod meson_gx_mmc
...
[  421.108614] Deleting MTD partitions on "spi0.0":
[  424.219862] spi_master spi0: Failed to power device: -13
...
lsmod | grep spi
spi_meson_spifc        16384 -1

Solution: just add spi_master_suspend(master) call

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 drivers/spi/spi-meson-spifc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c
index 8eca6f24c..8a97a6dbf 100644
--- a/drivers/spi/spi-meson-spifc.c
+++ b/drivers/spi/spi-meson-spifc.c
@@ -359,6 +359,7 @@ static int meson_spifc_remove(struct platform_device *pdev)
 	struct spi_master *master = platform_get_drvdata(pdev);
 	struct meson_spifc *spifc = spi_master_get_devdata(master);
 
+	spi_master_suspend(master);
 	pm_runtime_get_sync(&pdev->dev);
 	clk_disable_unprepare(spifc->clk);
 	pm_runtime_disable(&pdev->dev);
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2021-04-30 10:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23  3:42 [PATCH] SPI: meson-spifc add missed calls to remove function Artem Lapkin
2021-04-23 11:47 ` Mark Brown
2021-04-23 23:57   ` Art Nikpal
2021-04-26 11:56     ` Mark Brown
2021-04-30  8:49       ` Art Nikpal
2021-04-30 10:59         ` Mark Brown
2021-04-24  0:08   ` Art Nikpal

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).