diff options
Diffstat (limited to 'arch/um/drivers/net_kern.c')
-rw-r--r-- | arch/um/drivers/net_kern.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 84c73a300acb..fb1f9fb9b871 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #define DRIVER_NAME "uml-netdev" | 34 | #define DRIVER_NAME "uml-netdev" |
35 | 35 | ||
36 | static DEFINE_SPINLOCK(opened_lock); | 36 | static DEFINE_SPINLOCK(opened_lock); |
37 | LIST_HEAD(opened); | 37 | static LIST_HEAD(opened); |
38 | 38 | ||
39 | static int uml_net_rx(struct net_device *dev) | 39 | static int uml_net_rx(struct net_device *dev) |
40 | { | 40 | { |
@@ -150,6 +150,7 @@ static int uml_net_close(struct net_device *dev) | |||
150 | if(lp->close != NULL) | 150 | if(lp->close != NULL) |
151 | (*lp->close)(lp->fd, &lp->user); | 151 | (*lp->close)(lp->fd, &lp->user); |
152 | lp->fd = -1; | 152 | lp->fd = -1; |
153 | list_del(&lp->list); | ||
153 | 154 | ||
154 | spin_unlock(&lp->lock); | 155 | spin_unlock(&lp->lock); |
155 | return 0; | 156 | return 0; |
@@ -266,7 +267,7 @@ void uml_net_user_timer_expire(unsigned long _conn) | |||
266 | } | 267 | } |
267 | 268 | ||
268 | static DEFINE_SPINLOCK(devices_lock); | 269 | static DEFINE_SPINLOCK(devices_lock); |
269 | static struct list_head devices = LIST_HEAD_INIT(devices); | 270 | static LIST_HEAD(devices); |
270 | 271 | ||
271 | static struct platform_driver uml_net_driver = { | 272 | static struct platform_driver uml_net_driver = { |
272 | .driver = { | 273 | .driver = { |
@@ -586,7 +587,7 @@ static int net_config(char *str) | |||
586 | err = eth_parse(str, &n, &str); | 587 | err = eth_parse(str, &n, &str); |
587 | if(err) return(err); | 588 | if(err) return(err); |
588 | 589 | ||
589 | str = uml_strdup(str); | 590 | str = kstrdup(str, GFP_KERNEL); |
590 | if(str == NULL){ | 591 | if(str == NULL){ |
591 | printk(KERN_ERR "net_config failed to strdup string\n"); | 592 | printk(KERN_ERR "net_config failed to strdup string\n"); |
592 | return(-1); | 593 | return(-1); |
@@ -715,6 +716,7 @@ static void close_devices(void) | |||
715 | 716 | ||
716 | list_for_each(ele, &opened){ | 717 | list_for_each(ele, &opened){ |
717 | lp = list_entry(ele, struct uml_net_private, list); | 718 | lp = list_entry(ele, struct uml_net_private, list); |
719 | free_irq(lp->dev->irq, lp->dev); | ||
718 | if((lp->close != NULL) && (lp->fd >= 0)) | 720 | if((lp->close != NULL) && (lp->fd >= 0)) |
719 | (*lp->close)(lp->fd, &lp->user); | 721 | (*lp->close)(lp->fd, &lp->user); |
720 | if(lp->remove != NULL) (*lp->remove)(&lp->user); | 722 | if(lp->remove != NULL) (*lp->remove)(&lp->user); |