aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-10-25 02:53:01 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-10-25 03:12:01 -0400
commitadc4633c86f3358fce676b6c7ce75055e395123a (patch)
treefea3da09a058986ba85e6645a594a8426c42f52d /drivers/input/input.c
parent5161870f51acd74442375a6693c0586996d01f44 (diff)
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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 53a0ddee7872..f1be1a77edf3 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -534,8 +534,11 @@ EXPORT_SYMBOL(input_grab_device);
534static void __input_release_device(struct input_handle *handle) 534static void __input_release_device(struct input_handle *handle)
535{ 535{
536 struct input_dev *dev = handle->dev; 536 struct input_dev *dev = handle->dev;
537 struct input_handle *grabber;
537 538
538 if (dev->grab == handle) { 539 grabber = rcu_dereference_protected(dev->grab,
540 lockdep_is_held(&dev->mutex));
541 if (grabber == handle) {
539 rcu_assign_pointer(dev->grab, NULL); 542 rcu_assign_pointer(dev->grab, NULL);
540 /* Make sure input_pass_event() notices that grab is gone */ 543 /* Make sure input_pass_event() notices that grab is gone */
541 synchronize_rcu(); 544 synchronize_rcu();