diff options
| -rw-r--r-- | drivers/usb/storage/libusual.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/storage/libusual.c b/drivers/usb/storage/libusual.c index b1ec4a718547..599ad10a761b 100644 --- a/drivers/usb/storage/libusual.c +++ b/drivers/usb/storage/libusual.c | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/usb.h> | 8 | #include <linux/usb.h> |
| 9 | #include <linux/usb_usual.h> | 9 | #include <linux/usb_usual.h> |
| 10 | #include <linux/vmalloc.h> | 10 | #include <linux/vmalloc.h> |
| 11 | #include <linux/kthread.h> | ||
| 11 | 12 | ||
| 12 | /* | 13 | /* |
| 13 | */ | 14 | */ |
| @@ -117,7 +118,7 @@ static int usu_probe(struct usb_interface *intf, | |||
| 117 | const struct usb_device_id *id) | 118 | const struct usb_device_id *id) |
| 118 | { | 119 | { |
| 119 | unsigned long type; | 120 | unsigned long type; |
| 120 | int rc; | 121 | struct task_struct* task; |
| 121 | unsigned long flags; | 122 | unsigned long flags; |
| 122 | 123 | ||
| 123 | type = USB_US_TYPE(id->driver_info); | 124 | type = USB_US_TYPE(id->driver_info); |
| @@ -132,8 +133,9 @@ static int usu_probe(struct usb_interface *intf, | |||
| 132 | stat[type].fls |= USU_MOD_FL_THREAD; | 133 | stat[type].fls |= USU_MOD_FL_THREAD; |
| 133 | spin_unlock_irqrestore(&usu_lock, flags); | 134 | spin_unlock_irqrestore(&usu_lock, flags); |
| 134 | 135 | ||
| 135 | rc = kernel_thread(usu_probe_thread, (void*)type, CLONE_VM); | 136 | task = kthread_run(usu_probe_thread, (void*)type, "libusual_%d", type); |
| 136 | if (rc < 0) { | 137 | if (IS_ERR(task)) { |
| 138 | int rc = PTR_ERR(task); | ||
| 137 | printk(KERN_WARNING "libusual: " | 139 | printk(KERN_WARNING "libusual: " |
| 138 | "Unable to start the thread for %s: %d\n", | 140 | "Unable to start the thread for %s: %d\n", |
| 139 | bias_names[type], rc); | 141 | bias_names[type], rc); |
| @@ -175,8 +177,6 @@ static int usu_probe_thread(void *arg) | |||
| 175 | int rc; | 177 | int rc; |
| 176 | unsigned long flags; | 178 | unsigned long flags; |
| 177 | 179 | ||
| 178 | daemonize("libusual_%d", type); /* "usb-storage" is kinda too long */ | ||
| 179 | |||
| 180 | /* A completion does not work here because it's counted. */ | 180 | /* A completion does not work here because it's counted. */ |
| 181 | down(&usu_init_notify); | 181 | down(&usu_init_notify); |
| 182 | up(&usu_init_notify); | 182 | up(&usu_init_notify); |
