From: Keith Packard Date: Thu, 26 Mar 2015 23:49:38 +0000 (-0700) Subject: usb: Fix warnings in chaoskey driver X-Git-Tag: omap-for-v4.2/o2_dc~157^2~33 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b86ed078a65433a60ff59091a136d23724bd6d3;p=pandora-kernel.git 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 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed