Lines Matching refs:rt
21 static void usb6fire_comm_init_urb(struct comm_runtime *rt, struct urb *urb, in usb6fire_comm_init_urb() argument
26 urb->pipe = usb_sndintpipe(rt->chip->dev, COMM_EP); in usb6fire_comm_init_urb()
30 urb->dev = rt->chip->dev; in usb6fire_comm_init_urb()
35 struct comm_runtime *rt = urb->context; in usb6fire_comm_receiver_handler() local
36 struct midi_runtime *midi_rt = rt->chip->midi; in usb6fire_comm_receiver_handler()
39 if (rt->receiver_buffer[0] == 0x10) /* midi in event */ in usb6fire_comm_receiver_handler()
42 rt->receiver_buffer + 2, in usb6fire_comm_receiver_handler()
43 rt->receiver_buffer[1]); in usb6fire_comm_receiver_handler()
46 if (!rt->chip->shutdown) { in usb6fire_comm_receiver_handler()
106 static int usb6fire_comm_write8(struct comm_runtime *rt, u8 request, in usb6fire_comm_write8() argument
118 ret = usb6fire_comm_send_buffer(buffer, rt->chip->dev); in usb6fire_comm_write8()
124 static int usb6fire_comm_write16(struct comm_runtime *rt, u8 request, in usb6fire_comm_write16() argument
136 ret = usb6fire_comm_send_buffer(buffer, rt->chip->dev); in usb6fire_comm_write16()
144 struct comm_runtime *rt = kzalloc(sizeof(struct comm_runtime), in usb6fire_comm_init() local
149 if (!rt) in usb6fire_comm_init()
152 rt->receiver_buffer = kzalloc(COMM_RECEIVER_BUFSIZE, GFP_KERNEL); in usb6fire_comm_init()
153 if (!rt->receiver_buffer) { in usb6fire_comm_init()
154 kfree(rt); in usb6fire_comm_init()
158 urb = &rt->receiver; in usb6fire_comm_init()
159 rt->serial = 1; in usb6fire_comm_init()
160 rt->chip = chip; in usb6fire_comm_init()
162 rt->init_urb = usb6fire_comm_init_urb; in usb6fire_comm_init()
163 rt->write8 = usb6fire_comm_write8; in usb6fire_comm_init()
164 rt->write16 = usb6fire_comm_write16; in usb6fire_comm_init()
167 urb->transfer_buffer = rt->receiver_buffer; in usb6fire_comm_init()
172 urb->context = rt; in usb6fire_comm_init()
176 kfree(rt->receiver_buffer); in usb6fire_comm_init()
177 kfree(rt); in usb6fire_comm_init()
181 chip->comm = rt; in usb6fire_comm_init()
187 struct comm_runtime *rt = chip->comm; in usb6fire_comm_abort() local
189 if (rt) in usb6fire_comm_abort()
190 usb_poison_urb(&rt->receiver); in usb6fire_comm_abort()
195 struct comm_runtime *rt = chip->comm; in usb6fire_comm_destroy() local
197 kfree(rt->receiver_buffer); in usb6fire_comm_destroy()
198 kfree(rt); in usb6fire_comm_destroy()