Lines Matching refs:i1480_usb
47 struct i1480_usb {
56 void i1480_usb_init(struct i1480_usb *i1480_usb)
58 i1480_init(&i1480_usb->i1480);
63 int i1480_usb_create(struct i1480_usb *i1480_usb, struct usb_interface *iface)
68 i1480_usb->usb_dev = usb_get_dev(usb_dev); /* bind the USB device */
69 i1480_usb->usb_iface = usb_get_intf(iface);
70 usb_set_intfdata(iface, i1480_usb); /* Bind the driver to iface0 */
71 i1480_usb->neep_urb = usb_alloc_urb(0, GFP_KERNEL);
72 if (i1480_usb->neep_urb == NULL)
85 void i1480_usb_destroy(struct i1480_usb *i1480_usb)
87 usb_kill_urb(i1480_usb->neep_urb);
88 usb_free_urb(i1480_usb->neep_urb);
89 usb_set_intfdata(i1480_usb->usb_iface, NULL);
90 usb_put_intf(i1480_usb->usb_iface);
91 usb_put_dev(i1480_usb->usb_dev);
114 struct i1480_usb *i1480_usb = container_of(i1480, struct i1480_usb, i1480);
122 i1480_usb->usb_dev, usb_sndctrlpipe(i1480_usb->usb_dev, 0),
154 struct i1480_usb *i1480_usb = container_of(i1480, struct i1480_usb, i1480);
167 i1480_usb->usb_dev, usb_rcvctrlpipe(i1480_usb->usb_dev, 0),
240 struct i1480_usb *i1480_usb = container_of(i1480, struct i1480_usb, i1480);
245 epd = &i1480_usb->usb_iface->cur_altsetting->endpoint[0].desc;
246 usb_fill_int_urb(i1480_usb->neep_urb, i1480_usb->usb_dev,
247 usb_rcvintpipe(i1480_usb->usb_dev, epd->bEndpointAddress),
250 result = usb_submit_urb(i1480_usb->neep_urb, GFP_KERNEL);
263 usb_kill_urb(i1480_usb->neep_urb);
267 usb_kill_urb(i1480_usb->neep_urb);
295 struct i1480_usb *i1480_usb = container_of(i1480, struct i1480_usb, i1480);
301 iface_no = i1480_usb->usb_iface->cur_altsetting->desc.bInterfaceNumber;
302 epd = &i1480_usb->usb_iface->cur_altsetting->endpoint[0].desc;
304 i1480_usb->neep_urb, i1480_usb->usb_dev,
305 usb_rcvintpipe(i1480_usb->usb_dev, epd->bEndpointAddress),
308 result = usb_submit_urb(i1480_usb->neep_urb, GFP_KERNEL);
316 i1480_usb->usb_dev, usb_sndctrlpipe(i1480_usb->usb_dev, 0),
330 usb_kill_urb(i1480_usb->neep_urb);
344 struct i1480_usb *i1480_usb;
366 i1480_usb = kzalloc(sizeof(*i1480_usb), GFP_KERNEL);
367 if (i1480_usb == NULL) {
371 i1480_usb_init(i1480_usb);
373 i1480 = &i1480_usb->i1480;
383 result = i1480_usb_create(i1480_usb, iface);
401 result = i1480_fw_upload(&i1480_usb->i1480); /* the real thing */
403 usb_reset_device(i1480_usb->usb_dev);
406 i1480_usb_destroy(i1480_usb);
410 kfree(i1480_usb);