[PATCH] uml: use kstrdup
[safe/jmp/linux-2.6] / arch / um / drivers / net_kern.c
index 4cf31a2..29785f6 100644 (file)
@@ -268,9 +268,10 @@ void uml_net_user_timer_expire(unsigned long _conn)
 static DEFINE_SPINLOCK(devices_lock);
 static struct list_head devices = LIST_HEAD_INIT(devices);
 
-static struct device_driver uml_net_driver = {
-       .name  = DRIVER_NAME,
-       .bus   = &platform_bus_type,
+static struct platform_driver uml_net_driver = {
+       .driver = {
+               .name  = DRIVER_NAME,
+       },
 };
 static int driver_registered;
 
@@ -317,7 +318,7 @@ static int eth_configure(int n, void *init, char *mac,
 
        /* sysfs register */
        if (!driver_registered) {
-               driver_register(&uml_net_driver);
+               platform_driver_register(&uml_net_driver);
                driver_registered = 1;
        }
        device->pdev.id = n;
@@ -585,7 +586,7 @@ static int net_config(char *str)
        err = eth_parse(str, &n, &str);
        if(err) return(err);
 
-       str = uml_strdup(str);
+       str = kstrdup(str, GFP_KERNEL);
        if(str == NULL){
                printk(KERN_ERR "net_config failed to strdup string\n");
                return(-1);