]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / dock: Use acpi_device_enumerated() to check if dock is present
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 10 Feb 2014 12:44:20 +0000 (13:44 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 10 Feb 2014 12:44:20 +0000 (13:44 +0100)
commita0318bb62eada1b618cf4057ade8c12fa3e7e1ac
tree59a88b789ac1fb6387901940832f314adc44ed6a
parent4833216bbefc757fb955f83b3b69afb65eb1f015
ACPI / dock: Use acpi_device_enumerated() to check if dock is present

After commit 82f9a6c6c86b (ACPI / scan: Add acpi_device objects for
all device nodes in the namespace) acpi_bus_get_device() will always
return 0 for dock devices in dock_notify(), so the dock station
docking code under ACPI_NOTIFY_DEVICE_CHECK will never be executed
and docking will not work as a result of that.

Fix the problem by making dock_notify() use acpi_device_enumerated()
to check the presence of the device instead of checking the return
value of acpi_bus_get_device().

Fixes: 82f9a6c6c86b (ACPI / scan: Add acpi_device objects for all device nodes in the namespace)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/dock.c