All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: johan@kernel.org, linux-usb@vger.kernel.org
Cc: Oliver Neukum <oneukum@suse.com>
Subject: [PATCH] gpss: core: no waiters left behind on deregister
Date: Mon, 24 Jun 2019 10:33:23 +0200	[thread overview]
Message-ID: <20190624083323.11876-1-oneukum@suse.com> (raw)

If you deregister a device you need to wake up all waiters
as there will be no further wakeups.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/gnss/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
index e6f94501cb28..0d13bd2cefd5 100644
--- a/drivers/gnss/core.c
+++ b/drivers/gnss/core.c
@@ -303,7 +303,7 @@ void gnss_deregister_device(struct gnss_device *gdev)
 	down_write(&gdev->rwsem);
 	gdev->disconnected = true;
 	if (gdev->count) {
-		wake_up_interruptible(&gdev->read_queue);
+		wake_up_interruptible_all(&gdev->read_queue);
 		gdev->ops->close(gdev);
 	}
 	up_write(&gdev->rwsem);
-- 
2.16.4


             reply	other threads:[~2019-06-24  8:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  8:33 Oliver Neukum [this message]
2019-06-25  7:04 ` [PATCH] gpss: core: no waiters left behind on deregister Johan Hovold
2019-06-26 11:04   ` Oliver Neukum
2019-06-26 11:41     ` Johan Hovold
2019-07-01 10:00       ` Oliver Neukum
2019-06-25 10:47 ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190624083323.11876-1-oneukum@suse.com \
    --to=oneukum@suse.com \
    --cc=johan@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.