Input: mousedev - correct lockdep annotation
authorHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Wed, 13 Oct 2010 18:35:40 +0000 (11:35 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 18 Oct 2010 04:11:36 +0000 (21:11 -0700)
When annotating mutex to avoid false lockdep reports we should not
be using MOUSEDEV_MIX as lock subclass but rather SINGLE_DEPTH_NESTING.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/mousedev.c

index d528a2dba06418eb5e80097552463e9abec5db05..98973340d042ca0257f252e7640ff05032d9cf7c 100644 (file)
@@ -866,7 +866,7 @@ static struct mousedev *mousedev_create(struct input_dev *dev,
        spin_lock_init(&mousedev->client_lock);
        mutex_init(&mousedev->mutex);
        lockdep_set_subclass(&mousedev->mutex,
-                            minor == MOUSEDEV_MIX ? MOUSEDEV_MIX : 0);
+                            minor == MOUSEDEV_MIX ? SINGLE_DEPTH_NESTING : 0);
        init_waitqueue_head(&mousedev->wait);
 
        if (minor == MOUSEDEV_MIX)