Commit a8422ce5 authored by Maximilian Attems's avatar Maximilian Attems Committed by Greg Kroah-Hartman

[PATCH] list_for_each_entry: drivers-usb-media-dabusb.c

Use list_for_each_entry to make code more readable.
Compile tested.
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent c0759750
...@@ -109,16 +109,13 @@ static void dump_urb (struct urb *urb) ...@@ -109,16 +109,13 @@ static void dump_urb (struct urb *urb)
static int dabusb_cancel_queue (pdabusb_t s, struct list_head *q) static int dabusb_cancel_queue (pdabusb_t s, struct list_head *q)
{ {
unsigned long flags; unsigned long flags;
struct list_head *p;
pbuff_t b; pbuff_t b;
dbg("dabusb_cancel_queue"); dbg("dabusb_cancel_queue");
spin_lock_irqsave (&s->lock, flags); spin_lock_irqsave (&s->lock, flags);
for (p = q->next; p != q; p = p->next) { list_for_each_entry(b, q, buff_list) {
b = list_entry (p, buff_t, buff_list);
#ifdef DEBUG #ifdef DEBUG
dump_urb(b->purb); dump_urb(b->purb);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment