===================================================================
@@ -59,12 +59,12 @@ static inline void acpi_pci_slot_remove(
void acpiphp_init(void);
void acpiphp_enumerate_slots(struct pci_bus *bus);
void acpiphp_remove_slots(struct pci_bus *bus);
-void acpiphp_check_host_bridge(acpi_handle handle);
+void acpiphp_check_host_bridge(struct acpi_device *adev);
#else
static inline void acpiphp_init(void) { }
static inline void acpiphp_enumerate_slots(struct pci_bus *bus) { }
static inline void acpiphp_remove_slots(struct pci_bus *bus) { }
-static inline void acpiphp_check_host_bridge(acpi_handle handle) { }
+static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { }
#endif
#else /* CONFIG_ACPI */
===================================================================
@@ -51,7 +51,7 @@ static void acpi_pci_root_remove(struct
static int acpi_pci_root_scan_dependent(struct acpi_device *adev)
{
- acpiphp_check_host_bridge(adev->handle);
+ acpiphp_check_host_bridge(adev);
return 0;
}
===================================================================
@@ -378,15 +378,11 @@ static acpi_status register_slot(acpi_ha
return AE_OK;
}
-static struct acpiphp_bridge *acpiphp_handle_to_bridge(acpi_handle handle)
+static struct acpiphp_bridge *acpiphp_dev_to_bridge(struct acpi_device *adev)
{
- struct acpi_device *adev = acpi_bus_get_acpi_device(handle);
struct acpiphp_context *context;
struct acpiphp_bridge *bridge = NULL;
- if (!adev)
- return NULL;
-
acpi_lock_hp_context();
context = acpiphp_get_context(adev);
if (context) {
@@ -397,7 +393,6 @@ static struct acpiphp_bridge *acpiphp_ha
acpiphp_put_context(context);
}
acpi_unlock_hp_context();
- acpi_bus_put_acpi_device(adev);
return bridge;
}
@@ -764,11 +759,11 @@ static void acpiphp_sanitize_bus(struct
* ACPI event handlers
*/
-void acpiphp_check_host_bridge(acpi_handle handle)
+void acpiphp_check_host_bridge(struct acpi_device *adev)
{
struct acpiphp_bridge *bridge;
- bridge = acpiphp_handle_to_bridge(handle);
+ bridge = acpiphp_dev_to_bridge(adev);
if (bridge) {
pci_lock_rescan_remove();