diff options
author | Akinobu Mita <mita@miraclelinux.com> | 2006-06-26 03:24:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:18 -0400 |
commit | 179e09172ab663b8587ecc46bb18a56a770304a9 (patch) | |
tree | 4d57324584c43f81ac2a6d258bb46e75fb6b4327 /drivers/usb/serial | |
parent | a842ef297fd91b1b93f2aa5898d2efd19e95f6a5 (diff) |
[PATCH] drivers: use list_move()
This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under drivers/.
Acked-by: Corey Minyard <minyard@mvista.com>
Cc: Ben Collins <bcollins@debian.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Cc: Alasdair Kergon <dm-devel@redhat.com>
Cc: Gerd Knorr <kraxel@bytesex.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frank Pavlic <fpavlic@de.ibm.com>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Cc: Andrew Vasquez <linux-driver@qlogic.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/whiteheat.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 5b06fa366098..56ffc81302fc 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -686,19 +686,16 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp) | |||
686 | wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); | 686 | wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); |
687 | urb = wrap->urb; | 687 | urb = wrap->urb; |
688 | usb_kill_urb(urb); | 688 | usb_kill_urb(urb); |
689 | list_del(tmp); | 689 | list_move(tmp, &info->rx_urbs_free); |
690 | list_add(tmp, &info->rx_urbs_free); | ||
691 | } | ||
692 | list_for_each_safe(tmp, tmp2, &info->rx_urb_q) { | ||
693 | list_del(tmp); | ||
694 | list_add(tmp, &info->rx_urbs_free); | ||
695 | } | 690 | } |
691 | list_for_each_safe(tmp, tmp2, &info->rx_urb_q) | ||
692 | list_move(tmp, &info->rx_urbs_free); | ||
693 | |||
696 | list_for_each_safe(tmp, tmp2, &info->tx_urbs_submitted) { | 694 | list_for_each_safe(tmp, tmp2, &info->tx_urbs_submitted) { |
697 | wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); | 695 | wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); |
698 | urb = wrap->urb; | 696 | urb = wrap->urb; |
699 | usb_kill_urb(urb); | 697 | usb_kill_urb(urb); |
700 | list_del(tmp); | 698 | list_move(tmp, &info->tx_urbs_free); |
701 | list_add(tmp, &info->tx_urbs_free); | ||
702 | } | 699 | } |
703 | spin_unlock_irqrestore(&info->lock, flags); | 700 | spin_unlock_irqrestore(&info->lock, flags); |
704 | 701 | ||
@@ -1080,8 +1077,7 @@ static void whiteheat_write_callback(struct urb *urb, struct pt_regs *regs) | |||
1080 | err("%s - Not my urb!", __FUNCTION__); | 1077 | err("%s - Not my urb!", __FUNCTION__); |
1081 | return; | 1078 | return; |
1082 | } | 1079 | } |
1083 | list_del(&wrap->list); | 1080 | list_move(&wrap->list, &info->tx_urbs_free); |
1084 | list_add(&wrap->list, &info->tx_urbs_free); | ||
1085 | spin_unlock(&info->lock); | 1081 | spin_unlock(&info->lock); |
1086 | 1082 | ||
1087 | if (urb->status) { | 1083 | if (urb->status) { |
@@ -1371,8 +1367,7 @@ static int start_port_read(struct usb_serial_port *port) | |||
1371 | wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); | 1367 | wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); |
1372 | urb = wrap->urb; | 1368 | urb = wrap->urb; |
1373 | usb_kill_urb(urb); | 1369 | usb_kill_urb(urb); |
1374 | list_del(tmp); | 1370 | list_move(tmp, &info->rx_urbs_free); |
1375 | list_add(tmp, &info->rx_urbs_free); | ||
1376 | } | 1371 | } |
1377 | break; | 1372 | break; |
1378 | } | 1373 | } |