aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-27 17:08:09 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-29 05:40:43 -0500
commita951c773bc39677ef3fa42814be7f5218a3100b2 (patch)
tree49a241142e9a90d0b640f2be5e68d91d951e52db /drivers/acpi/scan.c
parent00159a2013269bc0a617de885e4b921349192bd0 (diff)
ACPI / scan: Clear match_driver flag in acpi_bus_trim()
Drivers should not bind to struct acpi_device objects that acpi_bus_trim() has been called for, so make that function clear flags.match_driver for those objects. If that is not done, an ACPI driver may theoretically try to operate a device that is not physically present. Fixes: 202317a573b2 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index c0f57ff15024..089dc403c43b 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -2044,6 +2044,7 @@ void acpi_bus_trim(struct acpi_device *adev)
2044 list_for_each_entry_reverse(child, &adev->children, node) 2044 list_for_each_entry_reverse(child, &adev->children, node)
2045 acpi_bus_trim(child); 2045 acpi_bus_trim(child);
2046 2046
2047 adev->flags.match_driver = false;
2047 if (handler) { 2048 if (handler) {
2048 if (handler->detach) 2049 if (handler->detach)
2049 handler->detach(adev); 2050 handler->detach(adev);