patch-2.4.27 linux-2.4.27/drivers/usb/storage/jumpshot.c

Next file: linux-2.4.27/drivers/usb/storage/scsiglue.c
Previous file: linux-2.4.27/drivers/usb/speedtch.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/usb/storage/jumpshot.c linux-2.4.27/drivers/usb/storage/jumpshot.c
@@ -710,15 +710,8 @@
 
 		// build the reply
 		//
-		ptr[0] = (info->sectors >> 24) & 0xFF;
-		ptr[1] = (info->sectors >> 16) & 0xFF;
-		ptr[2] = (info->sectors >> 8) & 0xFF;
-		ptr[3] = (info->sectors) & 0xFF;
-
-		ptr[4] = (info->ssize >> 24) & 0xFF;
-		ptr[5] = (info->ssize >> 16) & 0xFF;
-		ptr[6] = (info->ssize >> 8) & 0xFF;
-		ptr[7] = (info->ssize) & 0xFF;
+		((u32 *) ptr)[0] = cpu_to_be32(info->sectors - 1);
+		((u32 *) ptr)[1] = cpu_to_be32(info->ssize);
 
 		return USB_STOR_TRANSPORT_GOOD;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)