mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 14:17:43 +00:00
Input: fix list iteration in input_release_device()
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
b53174fb5a
commit
a2b2ed2ce2
1 changed files with 5 additions and 3 deletions
|
@ -236,10 +236,12 @@ EXPORT_SYMBOL(input_grab_device);
|
||||||
|
|
||||||
void input_release_device(struct input_handle *handle)
|
void input_release_device(struct input_handle *handle)
|
||||||
{
|
{
|
||||||
if (handle->dev->grab == handle) {
|
struct input_dev *dev = handle->dev;
|
||||||
handle->dev->grab = NULL;
|
|
||||||
|
|
||||||
list_for_each_entry(handle, &handle->dev->h_list, d_node)
|
if (dev->grab == handle) {
|
||||||
|
dev->grab = NULL;
|
||||||
|
|
||||||
|
list_for_each_entry(handle, &dev->h_list, d_node)
|
||||||
if (handle->handler->start)
|
if (handle->handler->start)
|
||||||
handle->handler->start(handle);
|
handle->handler->start(handle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue