* [PATCH 4.4.y] spi: unbinding slave before calling spi_destroy_queue
@ 2020-10-15 14:38 yangerkun
2020-10-16 8:02 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: yangerkun @ 2020-10-15 14:38 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
linux-4.4.y/linux-4.9.y.
Signed-off-by: yangerkun <yangerkun@huawei.com>
---
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);
-
mutex_lock(&board_lock);
list_del(&master->list);
mutex_unlock(&board_lock);
--
2.25.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4.4.y] spi: unbinding slave before calling spi_destroy_queue
2020-10-15 14:38 [PATCH 4.4.y] spi: unbinding slave before calling spi_destroy_queue yangerkun
@ 2020-10-16 8:02 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2020-10-16 8:02 UTC (permalink / raw)
To: yangerkun; +Cc: sashal, broonie, linux-spi, stable, yi.zhang, chenwenyong2
On Thu, Oct 15, 2020 at 10:38:34PM +0800, yangerkun wrote:
> 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
> linux-4.4.y/linux-4.9.y.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> ---
> drivers/spi/spi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks, now applied.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-16 8:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 14:38 [PATCH 4.4.y] spi: unbinding slave before calling spi_destroy_queue yangerkun
2020-10-16 8:02 ` Greg KH
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).