diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-07-29 22:48:32 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-08-21 22:29:54 -0700 |
commit | c5b3533a82ef4b6ceae81b7675f8d6dadcc6f3ab (patch) | |
tree | 00324d8ba4df6ea5cf97e6b775d7f0032eaa4b28 /drivers/input | |
parent | 00ce756ce53acdb82d408346e6a7b734ca9e5bad (diff) | |
download | linux-stable-c5b3533a82ef4b6ceae81b7675f8d6dadcc6f3ab.tar.gz linux-stable-c5b3533a82ef4b6ceae81b7675f8d6dadcc6f3ab.tar.bz2 linux-stable-c5b3533a82ef4b6ceae81b7675f8d6dadcc6f3ab.zip |
Input: uinput - specify exact bit sizes on userspace APIs
Switch to using __u32/__s32 instead of ordinary 'int' in structures
forming userspace API.
Also internally make request_id unsigned int.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/uinput.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 6099365102db..b247e1c8e8f6 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -59,7 +59,7 @@ static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned i static bool uinput_request_alloc_id(struct uinput_device *udev, struct uinput_request *request) { - int id; + unsigned int id; bool reserved = false; spin_lock(&udev->requests_lock); @@ -77,10 +77,11 @@ static bool uinput_request_alloc_id(struct uinput_device *udev, return reserved; } -static struct uinput_request *uinput_request_find(struct uinput_device *udev, int id) +static struct uinput_request *uinput_request_find(struct uinput_device *udev, + unsigned int id) { /* Find an input request, by ID. Returns NULL if the ID isn't valid. */ - if (id >= UINPUT_NUM_REQUESTS || id < 0) + if (id >= UINPUT_NUM_REQUESTS) return NULL; return udev->requests[id]; @@ -556,8 +557,8 @@ static int uinput_release(struct inode *inode, struct file *file) #ifdef CONFIG_COMPAT struct uinput_ff_upload_compat { - int request_id; - int retval; + __u32 request_id; + __s32 retval; struct ff_effect_compat effect; struct ff_effect_compat old; }; |