aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/pci_root.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-07 01:41:14 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-07 01:41:14 +0100
commit7f28ddeccea453fd20b1c74a88df19590ad9203c (patch)
tree4bf876eeb9adf2107f1c03178059bcd1676a9ee1 /drivers/acpi/pci_root.c
parent6931007cc90ba94b3c2b29179d0a7cde194dabe8 (diff)
ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug
In theory, an ACPI device object may be the parent of another device object whose hotplug is disabled by user space through its scan handler. In that case, the eject operation targeting the parent should fail as though the parent's own hotplug was disabled, but currently this is not the case, because acpi_scan_hot_remove() doesn't check the disable/enable hotplug status of the children of the top-most object passed to it. To fix this, modify acpi_bus_offline_companions() to return an error code if hotplug is disabled for the given device object. [Also change the name of the function to acpi_bus_offline(), because it is not only about companions any more, and change the name of acpi_bus_online_companions() accordingly.] Make acpi_scan_hot_remove() propagate that error to its callers. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers/acpi/pci_root.c')
0 files changed, 0 insertions, 0 deletions