Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97367
b: refs/heads/master
c: fa701bd
h: refs/heads/master
i:
  97365: ee3dff9
  97363: 54aebba
  97359: fd94962
v: v3
  • Loading branch information
Krzysztof Halasa authored and Jeff Garzik committed May 22, 2008
1 parent 96f9498 commit 12653e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ecc8c066f3cecb55807644a01435084d8ed638a
refs/heads/master: fa701bd24d6e64a2283d6fa386554775fd4336e7
19 changes: 11 additions & 8 deletions trunk/drivers/net/wan/hdlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ static const char* version = "HDLC support module revision 1.22";

#undef DEBUG_LINK

static struct hdlc_proto *first_proto = NULL;

static struct hdlc_proto *first_proto;

static int hdlc_change_mtu(struct net_device *dev, int new_mtu)
{
Expand Down Expand Up @@ -314,21 +313,25 @@ void detach_hdlc_protocol(struct net_device *dev)

void register_hdlc_protocol(struct hdlc_proto *proto)
{
rtnl_lock();
proto->next = first_proto;
first_proto = proto;
rtnl_unlock();
}


void unregister_hdlc_protocol(struct hdlc_proto *proto)
{
struct hdlc_proto **p = &first_proto;
while (*p) {
if (*p == proto) {
*p = proto->next;
return;
}
struct hdlc_proto **p;

rtnl_lock();
p = &first_proto;
while (*p != proto) {
BUG_ON(!*p);
p = &((*p)->next);
}
*p = proto->next;
rtnl_unlock();
}


Expand Down

0 comments on commit 12653e2

Please sign in to comment.