ACPI / dock: Dispatch dock notifications from the global notify handler
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 16 Feb 2014 00:51:01 +0000 (01:51 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 16 Feb 2014 00:51:01 +0000 (01:51 +0100)
commit1e2380cd144f6a9619f72f80ad9a93268f63b8dc
tree03f661af52c942b0d1c7523c1bd05af59b610671
parentd6a40224a30687f6e0471c4476e3a1a9adc28a96
ACPI / dock: Dispatch dock notifications from the global notify handler

The ACPI dock station code carries out an extra namespace scan
before the main one in order to find and register all of the dock
device objects.  Then, it registers a notify handler for each of
them for handling dock events.

However, dock device objects need not be scanned for upfront.  They
very well can be enumerated and registered during the first phase
of the main namespace scan, before attaching scan handlers and ACPI
drivers to ACPI device objects.  Then, the dependent devices can be
added to the in the second phase.  That makes it possible to drop
the extra namespace scan, so do it.

Moreover, it is not necessary to register notify handlers for all
of the dock stations' namespace nodes, becuase notifications may
be dispatched from the global notify handler for them.  Do that and
drop two functions used for dock notify handling, acpi_dock_deferred_cb()
and dock_notify_handler(), that aren't necessary any more.

Finally, some dock station objects have _HID objects matching the
ACPI container scan handler which causes it to claim those objects
and try to handle their hotplug, but that is not a good idea,
because those objects have their own special hotplug handling anyway.
For this reason, the hotplug_notify flag should not be set for ACPI
device objects representing dock stations and the container scan
handler should be made ignore those objects, so make that happen.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/container.c
drivers/acpi/dock.c
drivers/acpi/internal.h
drivers/acpi/scan.c
include/acpi/acpi_bus.h
This page took 0.02686 seconds and 5 git commands to generate.