1
0
Fork 0
remarkable-linux/drivers/acpi
Hans de Goede 24165131bc ACPI / scan: Initialize status to ACPI_STA_DEFAULT
[ Upstream commit 5971b0c159 ]

Since commit 63347db0af "ACPI / scan: Use acpi_bus_get_status() to
initialize ACPI_TYPE_DEVICE devs" the status field of normal acpi_devices
gets set to 0 by acpi_bus_type_and_status() and filled with its actual
value later when acpi_add_single_object() calls acpi_bus_get_status().

This means that any acpi_match_device_ids() calls in between will always
fail with -ENOENT.

We already have a workaround for this, which temporary forces status to
ACPI_STA_DEFAULT in drivers/acpi/x86/utils.c: acpi_device_always_present()
and the next commit in this series adds another acpi_match_device_ids()
call between status being initialized as 0 and the acpi_bus_get_status()
call.

Rather then adding another workaround, this commit makes
acpi_bus_type_and_status() initialize status to ACPI_STA_DEFAULT, this is
safe to do as the only code looking at status between the initialization
and the acpi_bus_get_status() call is those acpi_match_device_ids() calls.

Note this does mean that we need to (re)set status to 0 in case the
acpi_bus_get_status() call fails.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-15 09:45:30 +02:00
..
acpica ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c 2018-05-30 07:52:31 +02:00
apei ACPI / APEI: Remove ghes_ioremap_area 2018-08-17 21:01:10 +02:00
arm64 ACPI/IORT: Fix PCI ACS enablement 2017-10-04 17:34:41 +01:00
dptf License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfit nfit: fix unchecked dereference in acpi_nfit_ctl 2018-08-24 13:09:16 +02:00
pmic License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
x86 ACPI / property: Support Apple _DSM properties 2017-08-03 23:26:22 +02:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ac.c ACPI / AC: Add a blacklist with PMIC ACPI HIDs with a native charger driver 2017-04-19 22:53:35 +02:00
acpi_amba.c ACPI / amba: Remove CLK_IS_ROOT 2016-04-27 23:42:57 +02:00
acpi_apd.c ACPI: APD: Fix HID for Hisilicon Hip07/08 2017-07-30 14:33:48 +02:00
acpi_cmos_rtc.c char/genrtc: x86: remove remnants of asm/rtc.h 2016-06-04 00:20:07 +02:00
acpi_configfs.c ACPI: configfs: Unload SSDT on configfs entry removal 2017-06-22 02:43:12 +02:00
acpi_dbg.c ACPI: fix whitespace in pr_fmt() to align log entries 2017-06-22 02:18:20 +02:00
acpi_extlog.c ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() 2017-06-07 12:20:49 +02:00
acpi_ipmi.c ACPI / IPMI: change warning to debug on timeout 2017-04-07 12:25:37 -05:00
acpi_lpat.c ACPI / lpat: Fix typos in comments and kerneldoc style 2017-07-24 22:52:00 +02:00
acpi_lpss.c ACPI / LPSS: Only call pwm_add_table() for Bay Trail PWM if PMIC HRV is 2 2018-08-03 07:50:35 +02:00
acpi_memhotplug.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_pad.c ACPI: acpi_pad: Fix memory leak in power saving threads 2018-05-30 07:52:27 +02:00
acpi_platform.c ACPI / platform: Update platform device NUMA node based on _PXM method 2017-04-18 16:56:39 +02:00
acpi_pnp.c ACPI / PNP: constify device IDs 2016-01-04 22:10:30 +01:00
acpi_processor.c ACPI / processor: make function acpi_processor_check_duplicates() static 2017-08-24 03:25:47 +02:00
acpi_video.c ACPI / video: Only default only_lcd to true on Win8-ready _desktops_ 2018-04-29 11:33:18 +02:00
acpi_watchdog.c ACPI / watchdog: Prefer iTCO_wdt on Lenovo Z50-70 2018-06-21 04:02:47 +09:00
battery.c ACPI: make device_attribute const 2017-08-24 03:38:25 +02:00
battery.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bgrt.c ACPI: BGRT: constify attribute_group structures 2017-07-04 22:15:20 +02:00
blacklist.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
bus.c ACPI / bus: Do not call _STA on battery devices with unmet dependencies 2018-04-26 11:02:16 +02:00
button.c ACPI / button: make module loadable when booted in non-ACPI mode 2018-05-09 09:51:49 +02:00
cm_sbs.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
container.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
cppc_acpi.c scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
custom_method.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
debugfs.c ACPI: fix acpi_debugfs_init prototype 2015-08-07 02:55:18 +02:00
device_pm.c ACPI / PM: Fix acpi_pm_notifier_lock vs flush_workqueue() deadlock 2017-11-30 08:40:38 +00:00
device_sysfs.c ACPI / bus: Leave modalias empty for devices which are not present 2018-02-03 17:38:59 +01:00
dock.c ACPI / dock: constify attribute_group structure 2017-08-03 23:28:24 +02:00
ec.c ACPI / EC: Use ec_no_wakeup on more Thinkpad X1 Carbon 6th systems 2018-08-24 13:09:20 +02:00
ec_sys.c ACPI: EC: Fix debugfs_create_*() usage 2018-04-12 12:32:15 +02:00
event.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
evged.c ACPI / GED: make evged.c explicitly non-modular 2016-05-09 22:59:25 +02:00
fan.c ACPI / fan: Fix error reading cur_state 2016-10-10 02:20:43 +02:00
glue.c IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
hed.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
internal.h ACPI: EC: Fix debugfs_create_*() usage 2018-04-12 12:32:15 +02:00
ioapic.c ACPI: fix whitespace in pr_fmt() to align log entries 2017-06-22 02:18:20 +02:00
irq.c ACPI / irq: Fix return code of acpi_gsi_to_irq() 2017-07-12 13:11:49 +02:00
numa.c acpi, numa: fix pxm to online numa node associations 2018-03-28 18:24:41 +02:00
nvs.c ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem. 2014-05-27 18:13:08 +02:00
osi.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
osl.c acpi: Add helper for deactivating memory region 2018-07-08 15:30:46 +02:00
pci_irq.c ACPI / PCI: fix GIC irq model default PCI IRQ polarity 2016-09-10 02:50:50 +02:00
pci_link.c ACPI/PCI: pci_link: Include PIRQ_PENALTY_PCI_USING for ISA IRQs 2016-10-24 14:18:14 +02:00
pci_mcfg.c PCI/ACPI: Add ThunderX pass2.x 2nd node MCFG quirk 2017-04-24 11:58:56 -05:00
pci_root.c PCI: pciehp: Request control of native hotplug only if supported 2018-08-03 07:50:31 +02:00
pci_slot.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
power.c ACPI / power: constify attribute_group structures 2017-07-04 22:15:14 +02:00
proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor_core.c Revert"x86/acpi: Enable MADT APIs to return disabled apicids" 2017-03-11 14:41:18 +01:00
processor_driver.c ACPI: processor: use dev_dbg() instead of dev_warn() when CPPC probe failed 2017-07-27 01:51:06 +02:00
processor_idle.c Revert "x86/mm: Stop calling leave_mm() in idle code" 2017-11-04 15:01:50 +01:00
processor_pdc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor_perflib.c ACPI: processor_perflib: Do not send _PPC change notification if not ready 2018-04-26 11:02:16 +02:00
processor_thermal.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
processor_throttling.c acpi/processor: Prevent cpu hotplug deadlock 2017-05-26 10:10:47 +02:00
property.c ACPI: properties: Fix __acpi_node_get_property_reference() return codes 2017-10-11 21:16:37 +02:00
reboot.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
resource.c ACPI: Introduce DMA ranges parsing 2017-08-07 14:28:51 +02:00
sbs.c Merge branches 'acpi-video', 'acpi-battery', 'acpi-spcr' and 'acpi-misc' 2017-09-03 23:54:29 +02:00
sbshc.c ACPI: sbshc: remove raw pointer from printk() message 2018-02-16 20:23:10 +01:00
sbshc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scan.c ACPI / scan: Initialize status to ACPI_STA_DEFAULT 2018-09-15 09:45:30 +02:00
sleep.c ACPI / PM: save NVS memory for ASUS 1025C laptop 2018-08-22 07:46:10 +02:00
sleep.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spcr.c Merge branches 'acpi-video', 'acpi-battery', 'acpi-spcr' and 'acpi-misc' 2017-09-03 23:54:29 +02:00
sysfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tables.c ACPICA: Tables: Change table duplication check to be related to acpi_gbl_verify_table_checksum 2017-07-20 16:38:25 +02:00
thermal.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
utils.c ACPI / blacklist: add acpi_match_platform_list() 2017-08-29 01:42:48 +02:00
video_detect.c ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E 2018-04-24 09:36:25 +02:00
wakeup.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00