aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/libusual.c
diff options
context:
space:
mode:
authorMatthew Dharm <mdharm-usb@one-eyed-alien.net>2006-08-31 16:37:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:56 -0400
commit0e3c8c26c7013b9d34929857598fd86ff1c22a6c (patch)
tree39127c200f162e814a309bdbcb7f73ab39f74b54 /drivers/usb/storage/libusual.c
parent997694defd085f4dd168c6e7e0e82382c5be9db4 (diff)
USB: replace kernel_thread() with kthread_run() in libusual.c
Replaced kernel_thread() with kthread_run() since kernel_thread() is deprecated in drivers/modules. Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage/libusual.c')
-rw-r--r--drivers/usb/storage/libusual.c10
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);