Commit adc4633c authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: fix sparse warning in __input_release_device()

This fixes the following warning:
drivers/input/input.c:538:23: error: incompatible types in comparison expression (different address spaces)
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 5161870f
...@@ -534,8 +534,11 @@ EXPORT_SYMBOL(input_grab_device); ...@@ -534,8 +534,11 @@ EXPORT_SYMBOL(input_grab_device);
static void __input_release_device(struct input_handle *handle) static void __input_release_device(struct input_handle *handle)
{ {
struct input_dev *dev = handle->dev; struct input_dev *dev = handle->dev;
struct input_handle *grabber;
if (dev->grab == handle) { grabber = rcu_dereference_protected(dev->grab,
lockdep_is_held(&dev->mutex));
if (grabber == handle) {
rcu_assign_pointer(dev->grab, NULL); rcu_assign_pointer(dev->grab, NULL);
/* Make sure input_pass_event() notices that grab is gone */ /* Make sure input_pass_event() notices that grab is gone */
synchronize_rcu(); synchronize_rcu();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment