spd_to_iface[cam->speed]);
if (!interface)
return -ENXIO;
- pktsz = interface->endpoint[1].desc.wMaxPacketSize;
+ pktsz = le16_to_cpu(interface->endpoint[1].desc.wMaxPacketSize);
DEBUG(1, "pktsz = %d", pktsz);
if (!CAMERA_IS_OPERATIONAL(uvd)) {
err("Camera is not operational");
/* Unschedule all of the iso td's */
for (i=0; i < USBVIDEO_NUMSBUF; i++) {
- j = usb_unlink_urb(uvd->sbuf[i].urb);
- if (j < 0)
- err("usb_unlink_urb() error %d.", j);
-
- j = usb_unlink_urb(cam->sts_urb[i]);
- if (j < 0)
- err("usb_unlink_urb() error %d.", j);
+ usb_kill_urb(uvd->sbuf[i].urb);
+ usb_kill_urb(cam->sts_urb[i]);
}
if (!uvd->remove_pending) {
if (dev->descriptor.bNumConfigurations != 1)
return -ENODEV;
- info("Konica Webcam (rev. 0x%04x)", dev->descriptor.bcdDevice);
+ info("Konica Webcam (rev. 0x%04x)", le16_to_cpu(dev->descriptor.bcdDevice));
RESTRICT_TO_RANGE(speed, 0, MAX_SPEED);
/* Validate found interface: must have one ISO endpoint */
}
endpoint = &interface->endpoint[1].desc;
DEBUG(1, "found endpoint: addr: 0x%2.2x maxps = 0x%4.4x",
- endpoint->bEndpointAddress, endpoint->wMaxPacketSize);
+ endpoint->bEndpointAddress, le16_to_cpu(endpoint->wMaxPacketSize));
if (video_ep == 0)
video_ep = endpoint->bEndpointAddress;
else if (video_ep != endpoint->bEndpointAddress) {
interface->desc.bInterfaceNumber);
return -ENODEV;
}
- if (endpoint->wMaxPacketSize == 0) {
+ if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
if (inactInterface < 0)
inactInterface = i;
else {
actInterface = i;
}
}
- if(endpoint->wMaxPacketSize > maxPS)
- maxPS = endpoint->wMaxPacketSize;
+ if (le16_to_cpu(endpoint->wMaxPacketSize) > maxPS)
+ maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
}
if(actInterface == -1) {
err("Cant find required endpoint");
cam->input.evbit[0] = BIT(EV_KEY);
cam->input.keybit[LONG(BTN_0)] = BIT(BTN_0);
cam->input.id.bustype = BUS_USB;
- cam->input.id.vendor = dev->descriptor.idVendor;
- cam->input.id.product = dev->descriptor.idProduct;
- cam->input.id.version = dev->descriptor.bcdDevice;
+ cam->input.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ cam->input.id.product = le16_to_cpu(dev->descriptor.idProduct);
+ cam->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
input_register_device(&cam->input);
usb_make_path(dev, cam->input_physname, 56);