diff options
author | Keith Packard <keithp@keithp.com> | 2015-03-26 16:49:38 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-01 14:00:11 +0200 |
commit | 8b86ed078a65433a60ff59091a136d23724bd6d3 (patch) | |
tree | 1421952dd183bcef376938c8c8b35efca85a60b7 /drivers/gpio | |
parent | f4ea80a6026a09aa0b59ec7443b901660f390550 (diff) | |
download | linux-8b86ed078a65433a60ff59091a136d23724bd6d3.tar.bz2 |
usb: Fix warnings in chaoskey driver
> drivers/usb/misc/chaoskey.c: In function 'chaoskey_read':
> >> drivers/usb/misc/chaoskey.c:412:3: error: implicit declaration of function 'copy_to_user'
> >> [-Werror=implicit-function-declaration]
> remain = copy_to_user(buffer, dev->buf + dev->used, this_time);
I was unable to reproduce this locally, but added an explicit
#include <linux/uaccess.h>
which should ensure the definition on all architectures.
> sparse warnings: (new ones prefixed by >>)
>
> >> drivers/usb/misc/chaoskey.c:117:30: sparse: incorrect type in assignment (different base types)
> drivers/usb/misc/chaoskey.c:117:30: expected int [signed] size
> drivers/usb/misc/chaoskey.c:117:30: got restricted __le16 [usertype] wMaxPacketSize
Switched the code to using the USB descriptor accessor functions.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio')
0 files changed, 0 insertions, 0 deletions