Make code more readable with list_for_each_reverse.


Signed-off-by: Domen Puncer <domen@coderock.org>

--- c/arch/um/drivers/chan_kern.c	Wed Jun 16 07:20:21 2004
+++ list_for_each/arch/um/drivers/chan_kern.c	Wed Jul 28 18:15:01 2004
@@ -166,7 +166,6 @@
 
 void close_chan(struct list_head *chans)
 {
-	struct list_head *ele;
 	struct chan *chan;
 
 	/* Close in reverse order as open in case more than one of them
@@ -174,8 +173,7 @@
 	 * state.  Then, the first one opened will have the original state,
 	 * so it must be the last closed.
 	 */
-        for(ele = chans->prev; ele != chans; ele = ele->prev){
-                chan = list_entry(ele, struct chan, list);
+	list_for_each_entry_reverse(chan, chans, list) {
 		if(!chan->opened) continue;
 		if(chan->ops->close != NULL)
 			(*chan->ops->close)(chan->fd, chan->data);
