# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.649 -> 1.650 # drivers/usb/scanner.c 1.11 -> 1.12 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/12 fzago@austin.rr.com 1.650 # [PATCH] [PATCH] (repost) fix for big endian machines in scanner.c # # This patch fixes a problem with big endian machines and scanner drivers which # use the SCANNER_IOCTL_CTRLMSG ioctl. The big endian to little endian swap was # done twice, resulting in a no-op. # -------------------------------------------- # diff -Nru a/drivers/usb/scanner.c b/drivers/usb/scanner.c --- a/drivers/usb/scanner.c Thu Sep 12 16:25:48 2002 +++ b/drivers/usb/scanner.c Thu Sep 12 16:25:48 2002 @@ -771,7 +771,7 @@ if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg))) return -EFAULT; - nb = le16_to_cpup(&cmsg.req.wLength); + nb = cmsg.req.wLength; if (nb > sizeof(buf)) return -EINVAL; @@ -786,8 +786,8 @@ ret = usb_control_msg(dev, pipe, cmsg.req.bRequest, cmsg.req.bRequestType, - le16_to_cpup(&cmsg.req.wValue), - le16_to_cpup(&cmsg.req.wIndex), + cmsg.req.wValue, + cmsg.req.wIndex, buf, nb, HZ); if (ret < 0) {