# 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.619   -> 1.620  
#	drivers/usb/image/scanner.c	1.24    -> 1.25   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/09	fzago@austin.rr.com	1.620
# [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/image/scanner.c b/drivers/usb/image/scanner.c
--- a/drivers/usb/image/scanner.c	Mon Sep  9 15:15:15 2002
+++ b/drivers/usb/image/scanner.c	Mon Sep  9 15:15:15 2002
@@ -774,7 +774,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;
@@ -789,8 +789,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) {
