aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 17:45:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 17:45:47 -0500
commit31b6ca0af758a88e5e769b48cc6dde037ee37b96 (patch)
treee1968d7168affb25e33e2be2d1d102f94af98af0 /drivers/macintosh
parent56b85f32d530d09d6805488ad00775d4e0e3baab (diff)
parent554738da71004d96e06fb75f4772dfc3b0f47810 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (58 commits) Input: wacom_w8001 - support pen or touch only devices Input: wacom_w8001 - use __set_bit to set keybits Input: bu21013_ts - fix misuse of logical operation in place of bitop Input: i8042 - add Acer Aspire 5100 to the Dritek list Input: wacom - add support for digitizer in Lenovo W700 Input: psmouse - disable the synaptics extension on OLPC machines Input: psmouse - fix up Synaptics comment Input: synaptics - ignore bogus mt packet Input: synaptics - add multi-finger and semi-mt support Input: synaptics - report clickpad property input: mt: Document interface updates Input: fix double equality sign in uevent Input: introduce device properties hid: egalax: Add support for Wetab (726b) Input: include MT library as source for kerneldoc MAINTAINERS: Update input-mt entry hid: egalax: Add support for Samsung NB30 netbook hid: egalax: Document the new devices in Kconfig hid: egalax: Add support for Wetab hid: egalax: Convert to MT slots ... Fixed up trivial conflict in drivers/input/keyboard/Kconfig
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/mac_hid.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c
index 067f9962f499..6a82388505f0 100644
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -23,6 +23,8 @@ static int mouse_button3_keycode = KEY_RIGHTALT; /* right option key */
23 23
24static struct input_dev *mac_hid_emumouse_dev; 24static struct input_dev *mac_hid_emumouse_dev;
25 25
26static DEFINE_MUTEX(mac_hid_emumouse_mutex);
27
26static int mac_hid_create_emumouse(void) 28static int mac_hid_create_emumouse(void)
27{ 29{
28 static struct lock_class_key mac_hid_emumouse_dev_event_class; 30 static struct lock_class_key mac_hid_emumouse_dev_event_class;
@@ -187,6 +189,10 @@ static int mac_hid_toggle_emumouse(ctl_table *table, int write,
187 int old_val = *valp; 189 int old_val = *valp;
188 int rc; 190 int rc;
189 191
192 rc = mutex_lock_killable(&mac_hid_emumouse_mutex);
193 if (rc)
194 return rc;
195
190 rc = proc_dointvec(table, write, buffer, lenp, ppos); 196 rc = proc_dointvec(table, write, buffer, lenp, ppos);
191 197
192 if (rc == 0 && write && *valp != old_val) { 198 if (rc == 0 && write && *valp != old_val) {
@@ -202,6 +208,8 @@ static int mac_hid_toggle_emumouse(ctl_table *table, int write,
202 if (rc) 208 if (rc)
203 *valp = old_val; 209 *valp = old_val;
204 210
211 mutex_unlock(&mac_hid_emumouse_mutex);
212
205 return rc; 213 return rc;
206} 214}
207 215