Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47445
b: refs/heads/master
c: d3b7f69
h: refs/heads/master
i:
  47443: c6afa2c
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Feb 11, 2007
1 parent e6baff0 commit ae5358b
Show file tree
Hide file tree
Showing 3 changed files with 10 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: 190c3e456325942a17785332fe15b68eeb3775ca
refs/heads/master: d3b7f69de2b92e4b6057d81e6c52f629a8663368
9 changes: 5 additions & 4 deletions trunk/arch/um/drivers/net_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,8 @@ struct eth_init {
int index;
};

/* Filled in at boot time. Will need locking if the transports become
* modular.
*/
struct list_head transports = LIST_HEAD_INIT(transports);
static DEFINE_SPINLOCK(transports_lock);
static LIST_HEAD(transports);

/* Filled in during early boot */
struct list_head eth_cmd_line = LIST_HEAD_INIT(eth_cmd_line);
Expand Down Expand Up @@ -540,7 +538,10 @@ void register_transport(struct transport *new)
char *mac = NULL;
int match;

spin_lock(&transports_lock);
BUG_ON(!list_empty(&new->list));
list_add(&new->list, &transports);
spin_unlock(&transports_lock);

list_for_each_safe(ele, next, &eth_cmd_line){
eth = list_entry(ele, struct eth_init, list);
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/um/include/net_kern.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ struct net_kern_info {

struct transport {
struct list_head list;
char *name;
int (*setup)(char *, char **, void *);
const char *name;
int (* const setup)(char *, char **, void *);
const struct net_user_info *user;
const struct net_kern_info *kern;
int private_size;
int setup_size;
const int private_size;
const int setup_size;
};

extern struct net_device *ether_init(int);
Expand Down

0 comments on commit ae5358b

Please sign in to comment.