diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-13 23:27:24 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-23 04:00:20 +0200 |
commit | 87831273438d66167dddc6d73e42d49671cb56bb (patch) | |
tree | 8377ee31f20874c45c160abad721ca27505e981d /drivers/pci/hotplug/acpiphp.h | |
parent | cb7b8cedf6c88b9d1d08e0565e8da52180921071 (diff) |
ACPI / hotplug / PCI: Unified notify handler for hotplug events
Using the hotplug context objects introduced previously rework the
ACPI-based PCI hotplug (ACPIPHP) core code so that all notifications
for ACPI device objects corresponding to the hotplug PCI devices are
handled by one function, handle_hotplug_event(), which recognizes
whether it has to handle a bridge or a function.
In addition to code size reduction it allows some ugly pieces of code
where notify handlers have to be uninstalled and installed again to
go away. Moreover, it fixes a theoretically possible race between
handle_hotplug_event() and free_bridge() tearing down data structures
for the same handle.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp.h')
-rw-r--r-- | drivers/pci/hotplug/acpiphp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h index f946e47eca7..b96a8a9c39c 100644 --- a/drivers/pci/hotplug/acpiphp.h +++ b/drivers/pci/hotplug/acpiphp.h @@ -136,6 +136,7 @@ struct acpiphp_context { struct acpiphp_func *func; struct acpiphp_bridge *bridge; unsigned int refcount; + bool handler_for_func; }; /* |