* History:
* 1/21/00 Created.
*/
-void ibmcam_ProcessIsocData(struct uvd *uvd, struct usbvideo_frame *frame)
+static void ibmcam_ProcessIsocData(struct uvd *uvd,
+ struct usbvideo_frame *frame)
{
enum ParseState newstate;
long copylen = 0;
index,
cp,
sizeof(cp),
- HZ);
+ 1000);
#if 0
info("USB => %02x%02x%02x%02x%02x%02x%02x%02x "
"(req=$%02x val=$%04x ind=$%04x)",
index,
NULL,
0,
- HZ);
+ 1000);
}
if (i < 0) {
err("%s: ERROR=%d. Camera stopped; Reconnect or reload driver.",
if (dev->descriptor.bNumConfigurations != 1)
return -ENODEV;
- /* Is it an IBM camera? */
- if (dev->descriptor.idVendor != IBMCAM_VENDOR_ID)
- return -ENODEV;
- if ((dev->descriptor.idProduct != IBMCAM_PRODUCT_ID) &&
- (dev->descriptor.idProduct != VEO_800C_PRODUCT_ID) &&
- (dev->descriptor.idProduct != VEO_800D_PRODUCT_ID) &&
- (dev->descriptor.idProduct != NETCAM_PRODUCT_ID))
- return -ENODEV;
-
/* Check the version/revision */
- switch (dev->descriptor.bcdDevice) {
+ switch (le16_to_cpu(dev->descriptor.bcdDevice)) {
case 0x0002:
if (ifnum != 2)
return -ENODEV;
case 0x030A:
if (ifnum != 0)
return -ENODEV;
- if ((dev->descriptor.idProduct == NETCAM_PRODUCT_ID) ||
- (dev->descriptor.idProduct == VEO_800D_PRODUCT_ID))
+ if ((le16_to_cpu(dev->descriptor.idProduct) == NETCAM_PRODUCT_ID) ||
+ (le16_to_cpu(dev->descriptor.idProduct) == VEO_800D_PRODUCT_ID))
model = IBMCAM_MODEL_4;
else
model = IBMCAM_MODEL_2;
break;
default:
err("IBM camera with revision 0x%04x is not supported.",
- dev->descriptor.bcdDevice);
+ le16_to_cpu(dev->descriptor.bcdDevice));
return -ENODEV;
}
/* Print detailed info on what we found so far */
do {
char *brand = NULL;
- switch (dev->descriptor.idProduct) {
+ switch (le16_to_cpu(dev->descriptor.idProduct)) {
case NETCAM_PRODUCT_ID:
brand = "IBM NetCamera";
break;
break;
}
info("%s USB camera found (model %d, rev. 0x%04x)",
- brand, model, dev->descriptor.bcdDevice);
+ brand, model, le16_to_cpu(dev->descriptor.bcdDevice));
} while (0);
/* Validate found interface: must have one ISO endpoint */
err("Interface %d. has ISO OUT endpoint!", ifnum);
return -ENODEV;
}
- if (endpoint->wMaxPacketSize == 0) {
+ if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
if (inactInterface < 0)
inactInterface = i;
else {
} else {
if (actInterface < 0) {
actInterface = i;
- maxPS = endpoint->wMaxPacketSize;
+ maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
if (debug > 0)
info("Active setting=%d. maxPS=%d.", i, maxPS);
} else