diff options
Diffstat (limited to 'drivers/macintosh/mac_hid.c')
| -rw-r--r-- | drivers/macintosh/mac_hid.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index b461b1bed25b..06fd910b3fd1 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -187,13 +187,14 @@ static int mac_hid_toggle_emumouse(const struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int *valp = table->data; - int old_val = *valp; + int old_val; int rc; rc = mutex_lock_killable(&mac_hid_emumouse_mutex); if (rc) return rc; + old_val = *valp; rc = proc_dointvec(table, write, buffer, lenp, ppos); if (rc == 0 && write && *valp != old_val) { @@ -215,7 +216,7 @@ static int mac_hid_toggle_emumouse(const struct ctl_table *table, int write, } /* file(s) in /proc/sys/dev/mac_hid */ -static struct ctl_table mac_hid_files[] = { +static const struct ctl_table mac_hid_files[] = { { .procname = "mouse_button_emulation", .data = &mouse_emulate_buttons, |
