diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 9a84ed250d9f..5b049cd79553 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -6,7 +6,8 @@ | |||
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/acpi.h> | 8 | #include <linux/acpi.h> |
9 | #include <asm/signal.h> | 9 | #include <linux/signal.h> |
10 | #include <linux/kthread.h> | ||
10 | 11 | ||
11 | #include <acpi/acpi_drivers.h> | 12 | #include <acpi/acpi_drivers.h> |
12 | #include <acpi/acinterp.h> /* for acpi_ex_eisa_id_to_string() */ | 13 | #include <acpi/acinterp.h> /* for acpi_ex_eisa_id_to_string() */ |
@@ -154,6 +155,7 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, | |||
154 | acpi_status status; | 155 | acpi_status status; |
155 | acpi_object_type type = 0; | 156 | acpi_object_type type = 0; |
156 | struct acpi_device *acpi_device = to_acpi_device(d); | 157 | struct acpi_device *acpi_device = to_acpi_device(d); |
158 | struct task_struct *task; | ||
157 | 159 | ||
158 | if ((!count) || (buf[0] != '1')) { | 160 | if ((!count) || (buf[0] != '1')) { |
159 | return -EINVAL; | 161 | return -EINVAL; |
@@ -171,9 +173,11 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, | |||
171 | } | 173 | } |
172 | 174 | ||
173 | /* remove the device in another thread to fix the deadlock issue */ | 175 | /* remove the device in another thread to fix the deadlock issue */ |
174 | ret = kernel_thread(acpi_bus_hot_remove_device, | 176 | task = kthread_run(acpi_bus_hot_remove_device, |
175 | acpi_device->handle, SIGCHLD); | 177 | acpi_device->handle, "acpi_hot_remove_device"); |
176 | err: | 178 | if (IS_ERR(task)) |
179 | ret = PTR_ERR(task); | ||
180 | err: | ||
177 | return ret; | 181 | return ret; |
178 | } | 182 | } |
179 | 183 | ||