26 #include <linux/errno.h>
27 #include <linux/module.h>
28 #include <linux/slab.h>
31 {USB_DEVICE(0x05ac, 0x8300)},
40 struct usb_device *
dev = interface_to_usbdev(intf);
44 unsigned char data[4];
60 (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, buf, 1,
63 "Failed to initialise isight firmware loader\n");
68 while (ptr+4 <= firmware->
data+firmware->
size) {
70 len = (data[0] << 8 | data[1]);
71 req = (data[2] << 8 | data[3]);
79 for (; len > 0; req += 50) {
82 if (ptr+llen > firmware->
data+firmware->
size) {
84 "Malformed isight firmware");
93 (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, req, 0,
94 buf, llen, 300) != llen) {
96 "Failed to load isight firmware\n");
106 (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, buf, 1,
120 static void isight_firmware_disconnect(
struct usb_interface *intf)
124 static struct usb_driver isight_firmware_driver = {
125 .name =
"isight_firmware",
126 .probe = isight_firmware_load,
127 .disconnect = isight_firmware_disconnect,
128 .id_table = id_table,