PCI/ACPI: Check for _OSC support in acpi_pci_osc_control_set()
authorJoerg Roedel <jroedel@suse.de>
Tue, 24 Aug 2021 12:20:54 +0000 (14:20 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 28 Sep 2021 21:19:37 +0000 (16:19 -0500)
commit6bc779ee05d4fa66c99096dbf88ff61acbb8a887
treeb325c17ab717242e8db8f7a463c12794bd8330ec
parent87f1f87a16818c36431391ea8c30ea926cab917f
PCI/ACPI: Check for _OSC support in acpi_pci_osc_control_set()

Get rid of acpi_pci_osc_support() and check for _OSC supported features
directly in acpi_pci_osc_control_set(). There is no point in doing an
unconditional _OSC query with control=0 even when the kernel later wants to
take control over more features.

This saves one _OSC query and simplifies the code by getting rid of the
acpi_pci_osc_support() function. As a side effect, the !control checks in
acpi_pci_query_osc() can also be removed.

Link: https://lore.kernel.org/r/20210824122054.29481-5-joro@8bytes.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
drivers/acpi/pci_root.c