|
@@ -686,19 +686,16 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp)
|
|
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
|
|
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
|
|
urb = wrap->urb;
|
|
urb = wrap->urb;
|
|
usb_kill_urb(urb);
|
|
usb_kill_urb(urb);
|
|
- list_del(tmp);
|
|
|
|
- list_add(tmp, &info->rx_urbs_free);
|
|
|
|
- }
|
|
|
|
- list_for_each_safe(tmp, tmp2, &info->rx_urb_q) {
|
|
|
|
- list_del(tmp);
|
|
|
|
- list_add(tmp, &info->rx_urbs_free);
|
|
|
|
|
|
+ list_move(tmp, &info->rx_urbs_free);
|
|
}
|
|
}
|
|
|
|
+ list_for_each_safe(tmp, tmp2, &info->rx_urb_q)
|
|
|
|
+ list_move(tmp, &info->rx_urbs_free);
|
|
|
|
+
|
|
list_for_each_safe(tmp, tmp2, &info->tx_urbs_submitted) {
|
|
list_for_each_safe(tmp, tmp2, &info->tx_urbs_submitted) {
|
|
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
|
|
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
|
|
urb = wrap->urb;
|
|
urb = wrap->urb;
|
|
usb_kill_urb(urb);
|
|
usb_kill_urb(urb);
|
|
- list_del(tmp);
|
|
|
|
- list_add(tmp, &info->tx_urbs_free);
|
|
|
|
|
|
+ list_move(tmp, &info->tx_urbs_free);
|
|
}
|
|
}
|
|
spin_unlock_irqrestore(&info->lock, flags);
|
|
spin_unlock_irqrestore(&info->lock, flags);
|
|
|
|
|
|
@@ -1080,8 +1077,7 @@ static void whiteheat_write_callback(struct urb *urb, struct pt_regs *regs)
|
|
err("%s - Not my urb!", __FUNCTION__);
|
|
err("%s - Not my urb!", __FUNCTION__);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- list_del(&wrap->list);
|
|
|
|
- list_add(&wrap->list, &info->tx_urbs_free);
|
|
|
|
|
|
+ list_move(&wrap->list, &info->tx_urbs_free);
|
|
spin_unlock(&info->lock);
|
|
spin_unlock(&info->lock);
|
|
|
|
|
|
if (urb->status) {
|
|
if (urb->status) {
|
|
@@ -1371,8 +1367,7 @@ static int start_port_read(struct usb_serial_port *port)
|
|
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
|
|
wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
|
|
urb = wrap->urb;
|
|
urb = wrap->urb;
|
|
usb_kill_urb(urb);
|
|
usb_kill_urb(urb);
|
|
- list_del(tmp);
|
|
|
|
- list_add(tmp, &info->rx_urbs_free);
|
|
|
|
|
|
+ list_move(tmp, &info->rx_urbs_free);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|