dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Dmitry Torokhov 2012-10-24 23:53:01 -07:00
parent 5161870f51
commit adc4633c86
1 changed files with 4 additions and 1 deletions

View File

@ -534,8 +534,11 @@ EXPORT_SYMBOL(input_grab_device);
static void __input_release_device(struct input_handle *handle)
{
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);
/* Make sure input_pass_event() notices that grab is gone */
synchronize_rcu();