]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI/PM: Stop needlessly clearing state_saved on enumeration and thaw
authorLukas Wunner <lukas@wunner.de>
Wed, 19 Nov 2025 08:50:02 +0000 (09:50 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Nov 2025 22:58:20 +0000 (16:58 -0600)
commitbe9edde43d85d301a9b9d9678f34b3c111b85ead
tree4aa510a10c8d10e3719b6a55783ad1990af00586
parent894f475f88e06c0f352c829849560790dbdedbe5
PCI/PM: Stop needlessly clearing state_saved on enumeration and thaw

The state_saved flag tells the PCI core whether a driver assumes
responsibility to save Config Space and put the device into a low power
state on suspend.

The flag is currently initialized to false on enumeration, even though it
already is false (because struct pci_dev is zeroed by kzalloc()) and even
though it is set to false before commencing the suspend sequence (the only
code path where it's relevant).

The flag is also set to false in pci_pm_thaw(), i.e. on resume, when it's
no longer relevant.

Drop these two superfluous flag assignments for simplicity.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Link: https://patch.msgid.link/fd167945bd7852e1ca08cd4b202130659eea2c2f.1763483367.git.lukas@wunner.de
drivers/pci/pci-driver.c
drivers/pci/probe.c