diff options
-rw-r--r-- | drivers/acpi/proc.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c index afad67769db6..129effbb7bd4 100644 --- a/drivers/acpi/proc.c +++ b/drivers/acpi/proc.c | |||
@@ -341,7 +341,6 @@ acpi_system_write_wakeup_device(struct file *file, | |||
341 | char strbuf[5]; | 341 | char strbuf[5]; |
342 | char str[5] = ""; | 342 | char str[5] = ""; |
343 | unsigned int len = count; | 343 | unsigned int len = count; |
344 | struct acpi_device *found_dev = NULL; | ||
345 | 344 | ||
346 | if (len > 4) | 345 | if (len > 4) |
347 | len = 4; | 346 | len = 4; |
@@ -363,33 +362,10 @@ acpi_system_write_wakeup_device(struct file *file, | |||
363 | if (!strncmp(dev->pnp.bus_id, str, 4)) { | 362 | if (!strncmp(dev->pnp.bus_id, str, 4)) { |
364 | dev->wakeup.state.enabled = | 363 | dev->wakeup.state.enabled = |
365 | dev->wakeup.state.enabled ? 0 : 1; | 364 | dev->wakeup.state.enabled ? 0 : 1; |
366 | found_dev = dev; | 365 | physical_device_enable_wakeup(dev); |
367 | break; | 366 | break; |
368 | } | 367 | } |
369 | } | 368 | } |
370 | if (found_dev) { | ||
371 | physical_device_enable_wakeup(found_dev); | ||
372 | list_for_each_safe(node, next, &acpi_wakeup_device_list) { | ||
373 | struct acpi_device *dev = container_of(node, | ||
374 | struct | ||
375 | acpi_device, | ||
376 | wakeup_list); | ||
377 | |||
378 | if ((dev != found_dev) && | ||
379 | (dev->wakeup.gpe_number == | ||
380 | found_dev->wakeup.gpe_number) | ||
381 | && (dev->wakeup.gpe_device == | ||
382 | found_dev->wakeup.gpe_device)) { | ||
383 | printk(KERN_WARNING | ||
384 | "ACPI: '%s' and '%s' have the same GPE, " | ||
385 | "can't disable/enable one separately\n", | ||
386 | dev->pnp.bus_id, found_dev->pnp.bus_id); | ||
387 | dev->wakeup.state.enabled = | ||
388 | found_dev->wakeup.state.enabled; | ||
389 | physical_device_enable_wakeup(dev); | ||
390 | } | ||
391 | } | ||
392 | } | ||
393 | mutex_unlock(&acpi_device_lock); | 369 | mutex_unlock(&acpi_device_lock); |
394 | return count; | 370 | return count; |
395 | } | 371 | } |