usbatm cxacru.c,1.17,1.18 usbatm.c,1.14,1.15
kagan at infradead.org
kagan at infradead.org
Fri Mar 4 06:31:01 EST 2005
Update of /home/cvs/usbatm
In directory phoenix.infradead.org:/tmp/cvs-serv10195
Modified Files:
cxacru.c usbatm.c
Log Message:
Convert USB descriptors to cpu byte order (for 2.6.11)
Index: cxacru.c
===================================================================
RCS file: /home/cvs/usbatm/cxacru.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- cxacru.c 24 Feb 2005 18:28:09 -0000 1.17
+++ cxacru.c 4 Mar 2005 11:30:57 -0000 1.18
@@ -516,8 +516,8 @@
int off;
struct usb_device *usb_dev = instance->usbatm->usb_dev;
struct device *dev = &instance->usbatm->usb_intf->dev;
- const u32 vid = usb_dev->descriptor.idVendor;
- const u32 pid = usb_dev->descriptor.idProduct;
+ u32 signature = le16_to_cpu(usb_dev->descriptor.idVendor) |
+ (le16_to_cpu(usb_dev->descriptor.idProduct) << 16);
u32 val;
dbg("cxacru_upload_firmware");
@@ -563,8 +563,7 @@
}
/* Signature */
- val = (pid << 16) | (vid & 0xffff);
- ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SIG_ADDR, (u8 *) &val, 4);
+ ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SIG_ADDR, (u8 *) &signature, 4);
if (ret) {
dev_err(dev, "Signature storing failed: %d\n", ret);
return;
Index: usbatm.c
===================================================================
RCS file: /home/cvs/usbatm/usbatm.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- usbatm.c 7 Feb 2005 23:50:41 -0000 1.14
+++ usbatm.c 4 Mar 2005 11:30:58 -0000 1.15
@@ -1043,7 +1043,9 @@
int need_heavy;
dev_dbg(&intf->dev, "trying driver %s with vendor=0x%x, product=0x%x, ifnum %d\n",
- driver->driver_name, dev->descriptor.idVendor, dev->descriptor.idProduct,
+ driver->driver_name,
+ le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(dev->descriptor.idProduct),
intf->altsetting->desc.bInterfaceNumber);
/* instance init */
More information about the Usbatm-commits
mailing list