aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2025-06-04 10:50:01 -0500
committerBjorn Helgaas <bhelgaas@google.com>2025-06-04 10:50:01 -0500
commitf377d9cb2579843219f9f1c4a74ed1c3d1967859 (patch)
tree868eba401fa7123be35d5d0e1f23c85068d27ea8 /include
parentMerge branch 'pci/pci-acpi' (diff)
parentPCI: Explicitly put devices into D0 when initializing (diff)
downloadlinux-rng-f377d9cb2579843219f9f1c4a74ed1c3d1967859.tar.xz
linux-rng-f377d9cb2579843219f9f1c4a74ed1c3d1967859.zip
Merge branch 'pci/pm'
- Add pm_runtime_put() cleanup helper for use with __free() to automatically drop the device usage count when a pointer goes out of scope (Alex Williamson) - Increment PM usage counter when probing reset methods so we don't try to read config space of a powered-off device (Alex Williamson) - Set all devices to D0 during enumeration to ensure ACPI opregion is connected via _REG (Mario Limonciello) * pci/pm: PCI: Explicitly put devices into D0 when initializing PCI: Increment PM usage counter when probing reset methods PM: runtime: Define pm_runtime_put cleanup helper
Diffstat (limited to 'include')
-rw-r--r--include/linux/pm_runtime.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 7fb5a459847e..69d4b2929ee6 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -466,6 +466,8 @@ static inline int pm_runtime_put(struct device *dev)
return __pm_runtime_idle(dev, RPM_GET_PUT | RPM_ASYNC);
}
+DEFINE_FREE(pm_runtime_put, struct device *, if (_T) pm_runtime_put(_T))
+
/**
* __pm_runtime_put_autosuspend - Drop device usage counter and queue autosuspend if 0.
* @dev: Target device.