summaryrefslogtreecommitdiff
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-02-14 14:37:17 +0400
committerFelipe Balbi <balbi@ti.com>2012-02-14 15:44:27 +0400
commitd5261286949fc9ada701c7e30bf89e08a6dbf4de (patch)
treec921f947a3f9feb87ed95c7805a2dabc0805ca11 /drivers/usb/renesas_usbhs
parent6fecfb05c077586ba85aa6f52f10abf30a4bfb40 (diff)
downloadlinux-d5261286949fc9ada701c7e30bf89e08a6dbf4de.tar.xz
usb: renesas_usbhs: (cosmetic) simplify list operations
list.h already provide helpers to find the first entry and to move list nodes to the tail of another list. This patch simply uses those helpers, no functional changes. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r--drivers/usb/renesas_usbhs/fifo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 03a9cc529c82..fb2a88c5c210 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -76,8 +76,7 @@ void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt,
pipe->handler = &usbhsf_null_handler;
}
- list_del_init(&pkt->node);
- list_add_tail(&pkt->node, &pipe->list);
+ list_move_tail(&pkt->node, &pipe->list);
/*
* each pkt must hold own handler.
@@ -107,7 +106,7 @@ static struct usbhs_pkt *__usbhsf_pkt_get(struct usbhs_pipe *pipe)
if (list_empty(&pipe->list))
return NULL;
- return list_entry(pipe->list.next, struct usbhs_pkt, node);
+ return list_first_entry(&pipe->list, struct usbhs_pkt, node);
}
struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)