aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_glue.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-20 19:10:09 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-20 19:10:09 -0500
commit3b52b21fa1f44c8956e21dfba645eda959111b5e (patch)
tree8c6ac7f521467f66dbf55249beb25d0446ac6957 /drivers/pci/hotplug/acpiphp_glue.c
parent96075315c5e7077fc5a3ac54c9b9e97e376e66ed (diff)
ACPI / dock: Use ACPI device object pointers instead of ACPI handles
Rework the ACPI dock station driver to store ACPI device object pointers instead of ACPI handles in its internal data structures. The purpose is moslty to make subsequent simplifications possible, but also this allows the overall code size to be reduced slightly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index d3d2cc6bb40a..cd886725c42e 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -334,7 +334,7 @@ static acpi_status acpiphp_add_context(acpi_handle handle, u32 lvl, void *data,
334 * by the native PCIe hotplug (PCIeHP), becuase that code is supposed to 334 * by the native PCIe hotplug (PCIeHP), becuase that code is supposed to
335 * expose slots to user space in those cases. 335 * expose slots to user space in those cases.
336 */ 336 */
337 if ((acpi_pci_check_ejectable(pbus, handle) || is_dock_device(handle)) 337 if ((acpi_pci_check_ejectable(pbus, handle) || is_dock_device(adev))
338 && !(pdev && device_is_managed_by_native_pciehp(pdev))) { 338 && !(pdev && device_is_managed_by_native_pciehp(pdev))) {
339 unsigned long long sun; 339 unsigned long long sun;
340 int retval; 340 int retval;
@@ -369,7 +369,7 @@ static acpi_status acpiphp_add_context(acpi_handle handle, u32 lvl, void *data,
369 &val, 60*1000)) 369 &val, 60*1000))
370 slot->flags |= SLOT_ENABLED; 370 slot->flags |= SLOT_ENABLED;
371 371
372 if (is_dock_device(handle)) { 372 if (is_dock_device(adev)) {
373 /* we don't want to call this device's _EJ0 373 /* we don't want to call this device's _EJ0
374 * because we want the dock notify handler 374 * because we want the dock notify handler
375 * to call it after it calls _DCK 375 * to call it after it calls _DCK
@@ -411,7 +411,7 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
411 list_for_each_entry(func, &slot->funcs, sibling) { 411 list_for_each_entry(func, &slot->funcs, sibling) {
412 struct acpi_device *adev = func_to_acpi_device(func); 412 struct acpi_device *adev = func_to_acpi_device(func);
413 413
414 if (is_dock_device(adev->handle)) 414 if (is_dock_device(adev))
415 unregister_hotplug_dock_device(adev->handle); 415 unregister_hotplug_dock_device(adev->handle);
416 416
417 acpi_lock_hp_context(); 417 acpi_lock_hp_context();