]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/ppp_generic.c
device create: net: convert device_create_drvdata to device_create
[linux-2.6-omap-h63xx.git] / drivers / net / ppp_generic.c
index ddccc074a76a88da15574be350b408e0e9605817..03d027c68879db4d519cf96d1dbd1b63a265dc89 100644 (file)
@@ -866,8 +866,8 @@ static int __init ppp_init(void)
                        err = PTR_ERR(ppp_class);
                        goto out_chrdev;
                }
-               device_create_drvdata(ppp_class, NULL, MKDEV(PPP_MAJOR, 0),
-                                     NULL, "ppp");
+               device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL,
+                             "ppp");
        }
 
 out:
@@ -1833,9 +1833,11 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
 
        /* If the queue is getting long, don't wait any longer for packets
           before the start of the queue. */
-       if (skb_queue_len(&ppp->mrq) >= PPP_MP_MAX_QLEN
-           && seq_before(ppp->minseq, ppp->mrq.next->sequence))
-               ppp->minseq = ppp->mrq.next->sequence;
+       if (skb_queue_len(&ppp->mrq) >= PPP_MP_MAX_QLEN) {
+               struct sk_buff *skb = skb_peek(&ppp->mrq);
+               if (seq_before(ppp->minseq, skb->sequence))
+                       ppp->minseq = skb->sequence;
+       }
 
        /* Pull completed packets off the queue and receive them. */
        while ((skb = ppp_mp_reconstruct(ppp)))
@@ -1861,10 +1863,11 @@ ppp_mp_insert(struct ppp *ppp, struct sk_buff *skb)
 
        /* N.B. we don't need to lock the list lock because we have the
           ppp unit receive-side lock. */
-       for (p = list->next; p != (struct sk_buff *)list; p = p->next)
+       skb_queue_walk(list, p) {
                if (seq_before(seq, p->sequence))
                        break;
-       __skb_insert(skb, p->prev, p, list);
+       }
+       __skb_queue_before(list, p, skb);
 }
 
 /*