diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-09 12:44:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-09 12:44:25 -0500 |
commit | 54ce685cae30c106f062d714c11e644ab1b93b51 (patch) | |
tree | 40869cc4a3aabfb6d9ef1cb4f68835cca2e8558c /drivers/acpi/scan.c | |
parent | a051c14b8db35cb269e9d91e11fc3573b6f7475d (diff) | |
parent | d4abd46b7e7279a61a1aa76d1d1b16a990178e75 (diff) |
Merge tag 'acpi-part2-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI updates from Rafael Wysocki:
"These are mostly fixes and cleanups, a few new quirks, a couple of
updates related to the handling of ACPI tables and ACPICA copyrights
refreshment.
Specifics:
- Update the ACPICA kernel code to upstream revision 20180105
including:
* Assorted fixes (Jung-uk Kim)
* Support for X32 ABI compilation (Anuj Mittal)
* Update of ACPICA copyrights to 2018 (Bob Moore)
- Prepare for future modifications to avoid executing the _STA
control method too early (Hans de Goede)
- Make the processor performance control library code ignore _PPC
notifications if they cannot be handled and fix up the C1 idle
state definition when it is used as a fallback state (Chen Yu,
Yazen Ghannam)
- Make it possible to use the SPCR table on x86 and to replace the
original IORT table with a new one from initrd (Prarit Bhargava,
Shunyong Yang)
- Add battery-related quirks for Asus UX360UA and UX410UAK and add
quirks for table parsing on Dell XPS 9570 and Precision M5530 (Kai
Heng Feng)
- Address static checker warnings in the CPPC code (Gustavo Silva)
- Avoid printing a raw pointer to the kernel log in the smart battery
driver (Greg Kroah-Hartman)"
* tag 'acpi-part2-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI: sbshc: remove raw pointer from printk() message
ACPI: SPCR: Make SPCR available to x86
ACPI / CPPC: Use 64-bit arithmetic instead of 32-bit
ACPI / tables: Add IORT to injectable table list
ACPI / bus: Parse tables as term_list for Dell XPS 9570 and Precision M5530
ACPICA: Update version to 20180105
ACPICA: All acpica: Update copyrights to 2018
ACPI / processor: Set default C1 idle state description
ACPI / battery: Add quirk for Asus UX360UA and UX410UAK
ACPI: processor_perflib: Do not send _PPC change notification if not ready
ACPI / scan: Use acpi_bus_get_status() to initialize ACPI_TYPE_DEVICE devs
ACPI / bus: Do not call _STA on battery devices with unmet dependencies
PCI: acpiphp_ibm: prepare for acpi_get_object_info() no longer returning status
ACPI: export acpi_bus_get_status_handle()
ACPICA: Add a missing pair of parentheses
ACPICA: Prefer ACPI_TO_POINTER() over ACPI_ADD_PTR()
ACPICA: Avoid NULL pointer arithmetic
ACPICA: Linux: add support for X32 ABI compilation
ACPI / video: Use true for boolean value
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 | ||