Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c62fbf6 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Input: serio_raw - really signal HUP upon disconnect



Commit 8c1c10d5 attempted to signal
POLLHUP | POLLERR condition when polling disconnected device,
unfortunately it did not do it quite correctly.

Reported-by: default avatarChe-Liang Chiou <clchiou@chromium.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent d89c9bcb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -237,9 +237,9 @@ static unsigned int serio_raw_poll(struct file *file, poll_table *wait)

	mask = serio_raw->dead ? POLLHUP | POLLERR : POLLOUT | POLLWRNORM;
	if (serio_raw->head != serio_raw->tail)
		return POLLIN | POLLRDNORM;
		mask |= POLLIN | POLLRDNORM;

	return 0;
	return mask;
}

static const struct file_operations serio_raw_fops = {