Lines Matching refs:h
208 usb_close(struct usb_handle *h) in usb_close() argument
210 D("usb_close(): closing transport %p\n", h); in usb_close()
213 h->next->prev = h->prev; in usb_close()
214 h->prev->next = h->next; in usb_close()
215 h->prev = NULL; in usb_close()
216 h->next = NULL; in usb_close()
218 libusb_release_interface(h->devh, h->interface); in usb_close()
219 libusb_close(h->devh); in usb_close()
220 libusb_unref_device(h->dev); in usb_close()
224 free(h); in usb_close()
229 void usb_kick(struct usb_handle *h) in usb_kick() argument
231 D("usb_cick(): kicking transport %p\n", h); in usb_kick()
233 adb_mutex_lock(&h->lock); in usb_kick()
234 unregister_usb_transport(h); in usb_kick()
235 adb_mutex_unlock(&h->lock); in usb_kick()
237 h->next->prev = h->prev; in usb_kick()
238 h->prev->next = h->next; in usb_kick()
239 h->prev = NULL; in usb_kick()
240 h->next = NULL; in usb_kick()
242 libusb_release_interface(h->devh, h->interface); in usb_kick()
243 libusb_close(h->devh); in usb_kick()
244 libusb_unref_device(h->dev); in usb_kick()
245 free(h); in usb_kick()