Linux-SPI Archive on
 help / color / Atom feed
* [PATCH] spi: unbinding slave before calling spi_destroy_queue
@ 2020-10-15 14:29 yangerkun
  0 siblings, 0 replies; only message in thread
From: yangerkun @ 2020-10-15 14:29 UTC (permalink / raw)
  To: sashal, gregkh, broonie
  Cc: linux-spi, stable, yangerkun, yi.zhang, chenwenyong2

We make a mistake while backport 'commit 84855678add8 ("spi: Fix
controller unregister order")'. What we should do is call __unreigster
for each device before spi_destroy_queue. This problem exist in

Signed-off-by: yangerkun <>
 drivers/spi/spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index fe03771da5124..18031b755c376 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1957,13 +1957,13 @@ static int __unregister(struct device *dev, void *null)
 void spi_unregister_master(struct spi_master *master)
+	device_for_each_child(&master->dev, NULL, __unregister);
 	if (master->queued) {
 		if (spi_destroy_queue(master))
 			dev_err(&master->dev, "queue remove failed\n");
-	device_for_each_child(&master->dev, NULL, __unregister);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 14:29 [PATCH] spi: unbinding slave before calling spi_destroy_queue yangerkun

Linux-SPI Archive on

Archives are clonable:
	git clone --mirror linux-spi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spi linux-spi/ \
	public-inbox-index linux-spi

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone