diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 14:45:47 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 14:45:47 -0800 |
commit | 31b6ca0af758a88e5e769b48cc6dde037ee37b96 (patch) | |
tree | e1968d7168affb25e33e2be2d1d102f94af98af0 /drivers/macintosh/mac_hid.c | |
parent | 56b85f32d530d09d6805488ad00775d4e0e3baab (diff) | |
parent | 554738da71004d96e06fb75f4772dfc3b0f47810 (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/mac_hid.c')
-rw-r--r-- | drivers/macintosh/mac_hid.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index 067f9962f49..6a82388505f 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 */ static struct input_dev *mac_hid_emumouse_dev; +static DEFINE_MUTEX(mac_hid_emumouse_mutex); + static int mac_hid_create_emumouse(void) { 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, int old_val = *valp; int rc; + rc = mutex_lock_killable(&mac_hid_emumouse_mutex); + if (rc) + return rc; + rc = proc_dointvec(table, write, buffer, lenp, ppos); if (rc == 0 && write && *valp != old_val) { @@ -202,6 +208,8 @@ static int mac_hid_toggle_emumouse(ctl_table *table, int write, if (rc) *valp = old_val; + mutex_unlock(&mac_hid_emumouse_mutex); + return rc; } |