diff options
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index b0fe5272c76a..8e63d937babb 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1565,6 +1565,8 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle, | |||
1565 | device_initialize(&device->dev); | 1565 | device_initialize(&device->dev); |
1566 | dev_set_uevent_suppress(&device->dev, true); | 1566 | dev_set_uevent_suppress(&device->dev, true); |
1567 | acpi_init_coherency(device); | 1567 | acpi_init_coherency(device); |
1568 | /* Assume there are unmet deps until acpi_device_dep_initialize() runs */ | ||
1569 | device->dep_unmet = 1; | ||
1568 | } | 1570 | } |
1569 | 1571 | ||
1570 | void acpi_device_add_finalize(struct acpi_device *device) | 1572 | void acpi_device_add_finalize(struct acpi_device *device) |
@@ -1588,6 +1590,14 @@ static int acpi_add_single_object(struct acpi_device **child, | |||
1588 | } | 1590 | } |
1589 | 1591 | ||
1590 | acpi_init_device_object(device, handle, type, sta); | 1592 | acpi_init_device_object(device, handle, type, sta); |
1593 | /* | ||
1594 | * For ACPI_BUS_TYPE_DEVICE getting the status is delayed till here so | ||
1595 | * that we can call acpi_bus_get_status() and use its quirk handling. | ||
1596 | * Note this must be done before the get power-/wakeup_dev-flags calls. | ||
1597 | */ | ||
1598 | if (type == ACPI_BUS_TYPE_DEVICE) | ||
1599 | acpi_bus_get_status(device); | ||
1600 | |||
1591 | acpi_bus_get_power_flags(device); | 1601 | acpi_bus_get_power_flags(device); |
1592 | acpi_bus_get_wakeup_device_flags(device); | 1602 | acpi_bus_get_wakeup_device_flags(device); |
1593 | 1603 | ||
@@ -1660,9 +1670,11 @@ static int acpi_bus_type_and_status(acpi_handle handle, int *type, | |||
1660 | return -ENODEV; | 1670 | return -ENODEV; |
1661 | 1671 | ||
1662 | *type = ACPI_BUS_TYPE_DEVICE; | 1672 | *type = ACPI_BUS_TYPE_DEVICE; |
1663 | status = acpi_bus_get_status_handle(handle, sta); | 1673 | /* |
1664 | if (ACPI_FAILURE(status)) | 1674 | * acpi_add_single_object updates this once we've an acpi_device |
1665 | *sta = 0; | 1675 | * so that acpi_bus_get_status' quirk handling can be used. |
1676 | */ | ||
1677 | *sta = 0; | ||
1666 | break; | 1678 | break; |
1667 | case ACPI_TYPE_PROCESSOR: | 1679 | case ACPI_TYPE_PROCESSOR: |
1668 | *type = ACPI_BUS_TYPE_PROCESSOR; | 1680 | *type = ACPI_BUS_TYPE_PROCESSOR; |
@@ -1760,6 +1772,8 @@ static void acpi_device_dep_initialize(struct acpi_device *adev) | |||
1760 | acpi_status status; | 1772 | acpi_status status; |
1761 | int i; | 1773 | int i; |
1762 | 1774 | ||
1775 | adev->dep_unmet = 0; | ||
1776 | |||
1763 | if (!acpi_has_method(adev->handle, "_DEP")) | 1777 | if (!acpi_has_method(adev->handle, "_DEP")) |
1764 | return; | 1778 | return; |
1765 | 1779 | ||