Lines Matching refs:acecad
38 struct usb_acecad *acecad = urb->context; in usb_acecad_irq() local
39 unsigned char *data = acecad->data; in usb_acecad_irq()
40 struct input_dev *dev = acecad->input; in usb_acecad_irq()
41 struct usb_interface *intf = acecad->intf; in usb_acecad_irq()
95 struct usb_acecad *acecad = input_get_drvdata(dev); in usb_acecad_open() local
97 acecad->irq->dev = interface_to_usbdev(acecad->intf); in usb_acecad_open()
98 if (usb_submit_urb(acecad->irq, GFP_KERNEL)) in usb_acecad_open()
106 struct usb_acecad *acecad = input_get_drvdata(dev); in usb_acecad_close() local
108 usb_kill_urb(acecad->irq); in usb_acecad_close()
116 struct usb_acecad *acecad; in usb_acecad_probe() local
132 acecad = kzalloc(sizeof(struct usb_acecad), GFP_KERNEL); in usb_acecad_probe()
134 if (!acecad || !input_dev) { in usb_acecad_probe()
139 acecad->data = usb_alloc_coherent(dev, 8, GFP_KERNEL, &acecad->data_dma); in usb_acecad_probe()
140 if (!acecad->data) { in usb_acecad_probe()
145 acecad->irq = usb_alloc_urb(0, GFP_KERNEL); in usb_acecad_probe()
146 if (!acecad->irq) { in usb_acecad_probe()
151 acecad->intf = intf; in usb_acecad_probe()
152 acecad->input = input_dev; in usb_acecad_probe()
155 strscpy(acecad->name, dev->manufacturer, sizeof(acecad->name)); in usb_acecad_probe()
159 strlcat(acecad->name, " ", sizeof(acecad->name)); in usb_acecad_probe()
160 strlcat(acecad->name, dev->product, sizeof(acecad->name)); in usb_acecad_probe()
163 usb_make_path(dev, acecad->phys, sizeof(acecad->phys)); in usb_acecad_probe()
164 strlcat(acecad->phys, "/input0", sizeof(acecad->phys)); in usb_acecad_probe()
166 input_dev->name = acecad->name; in usb_acecad_probe()
167 input_dev->phys = acecad->phys; in usb_acecad_probe()
171 input_set_drvdata(input_dev, acecad); in usb_acecad_probe()
186 if (!strlen(acecad->name)) in usb_acecad_probe()
187 snprintf(acecad->name, sizeof(acecad->name), in usb_acecad_probe()
197 if (!strlen(acecad->name)) in usb_acecad_probe()
198 snprintf(acecad->name, sizeof(acecad->name), in usb_acecad_probe()
205 usb_fill_int_urb(acecad->irq, dev, pipe, in usb_acecad_probe()
206 acecad->data, maxp > 8 ? 8 : maxp, in usb_acecad_probe()
207 usb_acecad_irq, acecad, endpoint->bInterval); in usb_acecad_probe()
208 acecad->irq->transfer_dma = acecad->data_dma; in usb_acecad_probe()
209 acecad->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; in usb_acecad_probe()
211 err = input_register_device(acecad->input); in usb_acecad_probe()
215 usb_set_intfdata(intf, acecad); in usb_acecad_probe()
219 fail3: usb_free_urb(acecad->irq); in usb_acecad_probe()
220 fail2: usb_free_coherent(dev, 8, acecad->data, acecad->data_dma); in usb_acecad_probe()
222 kfree(acecad); in usb_acecad_probe()
228 struct usb_acecad *acecad = usb_get_intfdata(intf); in usb_acecad_disconnect() local
233 input_unregister_device(acecad->input); in usb_acecad_disconnect()
234 usb_free_urb(acecad->irq); in usb_acecad_disconnect()
235 usb_free_coherent(udev, 8, acecad->data, acecad->data_dma); in usb_acecad_disconnect()
236 kfree(acecad); in usb_acecad_disconnect()