Lines Matching refs:mouse
64 struct usb_mouse *mouse = urb->context; in usb_mouse_irq() local
65 signed char *data = mouse->data; in usb_mouse_irq()
66 struct input_dev *dev = mouse->dev; in usb_mouse_irq()
95 dev_err(&mouse->usbdev->dev, in usb_mouse_irq()
97 mouse->usbdev->bus->bus_name, in usb_mouse_irq()
98 mouse->usbdev->devpath, status); in usb_mouse_irq()
103 struct usb_mouse *mouse = input_get_drvdata(dev); in usb_mouse_open() local
105 mouse->irq->dev = mouse->usbdev; in usb_mouse_open()
106 if (usb_submit_urb(mouse->irq, GFP_KERNEL)) in usb_mouse_open()
114 struct usb_mouse *mouse = input_get_drvdata(dev); in usb_mouse_close() local
116 usb_kill_urb(mouse->irq); in usb_mouse_close()
124 struct usb_mouse *mouse; in usb_mouse_probe() local
141 mouse = kzalloc(sizeof(struct usb_mouse), GFP_KERNEL); in usb_mouse_probe()
143 if (!mouse || !input_dev) in usb_mouse_probe()
146 mouse->data = usb_alloc_coherent(dev, 8, GFP_ATOMIC, &mouse->data_dma); in usb_mouse_probe()
147 if (!mouse->data) in usb_mouse_probe()
150 mouse->irq = usb_alloc_urb(0, GFP_KERNEL); in usb_mouse_probe()
151 if (!mouse->irq) in usb_mouse_probe()
154 mouse->usbdev = dev; in usb_mouse_probe()
155 mouse->dev = input_dev; in usb_mouse_probe()
158 strlcpy(mouse->name, dev->manufacturer, sizeof(mouse->name)); in usb_mouse_probe()
162 strlcat(mouse->name, " ", sizeof(mouse->name)); in usb_mouse_probe()
163 strlcat(mouse->name, dev->product, sizeof(mouse->name)); in usb_mouse_probe()
166 if (!strlen(mouse->name)) in usb_mouse_probe()
167 snprintf(mouse->name, sizeof(mouse->name), in usb_mouse_probe()
172 usb_make_path(dev, mouse->phys, sizeof(mouse->phys)); in usb_mouse_probe()
173 strlcat(mouse->phys, "/input0", sizeof(mouse->phys)); in usb_mouse_probe()
175 input_dev->name = mouse->name; in usb_mouse_probe()
176 input_dev->phys = mouse->phys; in usb_mouse_probe()
188 input_set_drvdata(input_dev, mouse); in usb_mouse_probe()
193 usb_fill_int_urb(mouse->irq, dev, pipe, mouse->data, in usb_mouse_probe()
195 usb_mouse_irq, mouse, endpoint->bInterval); in usb_mouse_probe()
196 mouse->irq->transfer_dma = mouse->data_dma; in usb_mouse_probe()
197 mouse->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; in usb_mouse_probe()
199 error = input_register_device(mouse->dev); in usb_mouse_probe()
203 usb_set_intfdata(intf, mouse); in usb_mouse_probe()
207 usb_free_urb(mouse->irq); in usb_mouse_probe()
209 usb_free_coherent(dev, 8, mouse->data, mouse->data_dma); in usb_mouse_probe()
212 kfree(mouse); in usb_mouse_probe()
218 struct usb_mouse *mouse = usb_get_intfdata (intf); in usb_mouse_disconnect() local
221 if (mouse) { in usb_mouse_disconnect()
222 usb_kill_urb(mouse->irq); in usb_mouse_disconnect()
223 input_unregister_device(mouse->dev); in usb_mouse_disconnect()
224 usb_free_urb(mouse->irq); in usb_mouse_disconnect()
225 usb_free_coherent(interface_to_usbdev(intf), 8, mouse->data, mouse->data_dma); in usb_mouse_disconnect()
226 kfree(mouse); in usb_mouse_disconnect()