/* tower_abort_transfers aborts transfers and frees associated data structures  */
static void tower_abort_transfers(struct lego_usb_tower *dev)
/* tower_abort_transfers aborts transfers and frees associated data structures  */
static void tower_abort_transfers(struct lego_usb_tower *dev)
{
	dbg(2, "%s: enter", __func__);
	if (dev == NULL) {
		dbg(1, "%s: dev is null", __func__);
		goto exit;
	}
	if (dev->interrupt_in_running) {
		dev->interrupt_in_running = 0;
		mb();
		if (dev->udev)
			usb_kill_urb (dev->interrupt_in_urb);
	}
	if (dev->interrupt_out_busy && dev->udev)
		usb_kill_urb(dev->interrupt_out_urb);
exit:
	dbg(2, "%s: leave", __func__);
}