aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/mac_hid.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2008-04-18 00:25:38 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-24 13:25:13 -0400
commit8fd76c4506817a93718fab0d6b3a55b9becc9f2c (patch)
tree897f0a659dfa193230be6590443c3d675ba8c244 /drivers/macintosh/mac_hid.c
parent8c6deb9c8fd29feaeae3aae500608beac777ea9e (diff)
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>
Diffstat (limited to 'drivers/macintosh/mac_hid.c')
-rw-r--r--drivers/macintosh/mac_hid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c
index 89302309da92..f972ff377b63 100644
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -103,6 +103,9 @@ int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down)
103 return 0; 103 return 0;
104} 104}
105 105
106static struct lock_class_key emumousebtn_event_class;
107static struct lock_class_key emumousebtn_mutex_class;
108
106static int emumousebtn_input_register(void) 109static int emumousebtn_input_register(void)
107{ 110{
108 int ret; 111 int ret;
@@ -111,6 +114,9 @@ static int emumousebtn_input_register(void)
111 if (!emumousebtn) 114 if (!emumousebtn)
112 return -ENOMEM; 115 return -ENOMEM;
113 116
117 lockdep_set_class(emumousebtn->event_lock, &emumousebtn_event_class);
118 lockdep_set_class(emumousebtn->mutex, &emumousebtn_mutex_class);
119
114 emumousebtn->name = "Macintosh mouse button emulation"; 120 emumousebtn->name = "Macintosh mouse button emulation";
115 emumousebtn->id.bustype = BUS_ADB; 121 emumousebtn->id.bustype = BUS_ADB;
116 emumousebtn->id.vendor = 0x0001; 122 emumousebtn->id.vendor = 0x0001;