mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-05 18:59:58 +00:00
Input: mac_hid - add lockdep annotation to emumousebtn
The mouse button emulation calls input device methods from an input device. This causes funny lock nesting which is harmless as each device has its own locks. Give the nesting device its own lock classes so that lockdep will not consider them the same. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
8c6deb9c8f
commit
8fd76c4506
1 changed files with 6 additions and 0 deletions
|
@ -103,6 +103,9 @@ int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct lock_class_key emumousebtn_event_class;
|
||||
static struct lock_class_key emumousebtn_mutex_class;
|
||||
|
||||
static int emumousebtn_input_register(void)
|
||||
{
|
||||
int ret;
|
||||
|
@ -111,6 +114,9 @@ static int emumousebtn_input_register(void)
|
|||
if (!emumousebtn)
|
||||
return -ENOMEM;
|
||||
|
||||
lockdep_set_class(emumousebtn->event_lock, &emumousebtn_event_class);
|
||||
lockdep_set_class(emumousebtn->mutex, &emumousebtn_mutex_class);
|
||||
|
||||
emumousebtn->name = "Macintosh mouse button emulation";
|
||||
emumousebtn->id.bustype = BUS_ADB;
|
||||
emumousebtn->id.vendor = 0x0001;
|
||||
|
|
Loading…
Reference in a new issue