projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'acpi-blacklist'
[deliverable/linux.git]
/
drivers
/
input
/
evdev.c
diff --git
a/drivers/input/evdev.c
b/drivers/input/evdev.c
index de055451d1af6e5beab07118eb38b6a90003c8a8..bc203485716d870205a22d38add99ad6c1a9ea1e 100644
(file)
--- a/
drivers/input/evdev.c
+++ b/
drivers/input/evdev.c
@@
-738,20
+738,23
@@
static int evdev_handle_set_keycode_v2(struct input_dev *dev, void __user *p)
*/
static int evdev_handle_get_val(struct evdev_client *client,
struct input_dev *dev, unsigned int type,
*/
static int evdev_handle_get_val(struct evdev_client *client,
struct input_dev *dev, unsigned int type,
- unsigned long *bits, unsigned int max,
- unsigned int size, void __user *p, int compat)
+ unsigned long *bits, unsigned int maxbit,
+ unsigned int maxlen, void __user *p,
+ int compat)
{
int ret;
unsigned long *mem;
{
int ret;
unsigned long *mem;
+ size_t len;
- mem = kmalloc(sizeof(unsigned long) * max, GFP_KERNEL);
+ len = BITS_TO_LONGS(maxbit) * sizeof(unsigned long);
+ mem = kmalloc(len, GFP_KERNEL);
if (!mem)
return -ENOMEM;
spin_lock_irq(&dev->event_lock);
spin_lock(&client->buffer_lock);
if (!mem)
return -ENOMEM;
spin_lock_irq(&dev->event_lock);
spin_lock(&client->buffer_lock);
- memcpy(mem, bits,
sizeof(unsigned long) * max
);
+ memcpy(mem, bits,
len
);
spin_unlock(&dev->event_lock);
spin_unlock(&dev->event_lock);
@@
-759,7
+762,7
@@
static int evdev_handle_get_val(struct evdev_client *client,
spin_unlock_irq(&client->buffer_lock);
spin_unlock_irq(&client->buffer_lock);
- ret = bits_to_user(mem, max
, size
, p, compat);
+ ret = bits_to_user(mem, max
bit, maxlen
, p, compat);
if (ret < 0)
evdev_queue_syn_dropped(client);
if (ret < 0)
evdev_queue_syn_dropped(client);
This page took
0.026238 seconds
and
5
git commands to generate.