aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-02-07 15:12:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-02-07 15:12:21 -0500
commit22446d3f23dd250ed1922edc8cc8a003bcb2538e (patch)
treee13cb0713f382d27f5d932ac80cdfecf933a82e1 /drivers/acpi/scan.c
parent9343224bfd4be6a02e6ae0c0d66426c955c7d76e (diff)
parenta2ff34c433932e201ea3c5081335f3beeb2509bd (diff)
Merge tag 'pm+acpi-3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI and power management fixes from Rafael Wysocki: "These include a fix for a recent ACPI hotplug regression, four concurrency related fixes and one PCI device removal fix for ACPI-based PCI hotplug (ACPIPHP), intel_pstate fix that should go into stable, three simple ACPI cleanups and a new entry for the ACPI video blacklist. Specifics: - Fix for a recent ACPI hotplug regression causing a NULL pointer dereference to occur while handling ACPI eject notifications for already ejected devices. From Toshi Kani. - Four concurrency-related fixes for ACPIPHP. Two of them add missing locking and the other two fix race conditions related to reference counting. - ACPIPHP fix to avoid NULL pointer dereferences during device removal involving Virtual Funcions. - intel_pstate fix to make it compute the percentage of time the CPU is busy properly. From Dirk Brandewie. - Removal of two unnecessary NULL pointer checks in ACPI code and a fix for sscanf() format string from Dan Carpenter and Luis G.F. - New ACPI video blacklist entry for HP EliteBook Revolve 810 from Mika Westerberg" * tag 'pm+acpi-3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / hotplug: Fix panic on eject to ejected device ACPI / battery: Fix incorrect sscanf() string in acpi_battery_init_alarm() ACPI / proc: remove unneeded NULL check ACPI / utils: remove a pointless NULL check ACPI / video: Add HP EliteBook Revolve 810 to the blacklist intel_pstate: Take core C0 time into account for core busy calculation ACPI / hotplug / PCI: Fix bridge removal race vs dock events ACPI / hotplug / PCI: Fix bridge removal race in handle_hotplug_event() ACPI / hotplug / PCI: Scan root bus under the PCI rescan-remove lock ACPI / hotplug / PCI: Move PCI rescan-remove locking to hotplug_event() ACPI / hotplug / PCI: Remove entries from bus->devices in reverse order
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 7384158c7f87..57b053f424d1 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -484,7 +484,6 @@ static void acpi_device_hotplug(void *data, u32 src)
484static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data) 484static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data)
485{ 485{
486 u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; 486 u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE;
487 struct acpi_scan_handler *handler = data;
488 struct acpi_device *adev; 487 struct acpi_device *adev;
489 acpi_status status; 488 acpi_status status;
490 489
@@ -500,7 +499,10 @@ static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data)
500 break; 499 break;
501 case ACPI_NOTIFY_EJECT_REQUEST: 500 case ACPI_NOTIFY_EJECT_REQUEST:
502 acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n"); 501 acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n");
503 if (!handler->hotplug.enabled) { 502 if (!adev->handler)
503 goto err_out;
504
505 if (!adev->handler->hotplug.enabled) {
504 acpi_handle_err(handle, "Eject disabled\n"); 506 acpi_handle_err(handle, "Eject disabled\n");
505 ost_code = ACPI_OST_SC_EJECT_NOT_SUPPORTED; 507 ost_code = ACPI_OST_SC_EJECT_NOT_SUPPORTED;
506 goto err_out; 508 goto err_out;