diff options
author | Dmitry Torokhov | 2020-05-17 21:10:28 -0700 |
---|---|---|
committer | Dmitry Torokhov | 2020-05-17 21:10:28 -0700 |
commit | 2969869bfac3cb8c549f6cadea6b97bb1d9ec86f (patch) | |
tree | 50a585182a13e7ebe587ea1cf34f06272c218b02 /drivers/input/evdev.c | |
parent | 04e49867fad1f4a0739862bb15133f96ace1d190 (diff) | |
parent | d34fced41e172fae2df7819b1d5a398c62067599 (diff) |
Merge branch 'for-linus' into next
Merge for-linus branch to sync Elan touchscreen driver code.
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r-- | drivers/input/evdev.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 84ea84b27a28..e494295d1c7b 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -327,20 +327,6 @@ static int evdev_fasync(int fd, struct file *file, int on) return fasync_helper(fd, file, on, &client->fasync); } -static int evdev_flush(struct file *file, fl_owner_t id) -{ - struct evdev_client *client = file->private_data; - struct evdev *evdev = client->evdev; - - mutex_lock(&evdev->mutex); - - if (evdev->exist && !client->revoked) - input_flush_device(&evdev->handle, file); - - mutex_unlock(&evdev->mutex); - return 0; -} - static void evdev_free(struct device *dev) { struct evdev *evdev = container_of(dev, struct evdev, dev); @@ -454,6 +440,10 @@ static int evdev_release(struct inode *inode, struct file *file) unsigned int i; mutex_lock(&evdev->mutex); + + if (evdev->exist && !client->revoked) + input_flush_device(&evdev->handle, file); + evdev_ungrab(evdev, client); mutex_unlock(&evdev->mutex); @@ -1311,7 +1301,6 @@ static const struct file_operations evdev_fops = { .compat_ioctl = evdev_ioctl_compat, #endif .fasync = evdev_fasync, - .flush = evdev_flush, .llseek = no_llseek, }; |