android_kernel_motorola_sm6375/drivers/base
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Douglas Anderson fef59ee6c0 PM: runtime: Have devm_pm_runtime_enable() handle pm_runtime_dont_use_autosuspend()
[ Upstream commit b4060db9251f919506e4d672737c6b8ab9a84701 ]

The PM Runtime docs say:

  Drivers in ->remove() callback should undo the runtime PM changes done
  in ->probe(). Usually this means calling pm_runtime_disable(),
  pm_runtime_dont_use_autosuspend() etc.

>From grepping code, it's clear that many people aren't aware of the
need to call pm_runtime_dont_use_autosuspend().

When brainstorming solutions, one idea that came up was to leverage
the new-ish devm_pm_runtime_enable() function. The idea here is that:

 * When the devm action is called we know that the driver is being
   removed. It's the perfect time to undo the use_autosuspend.

 * The code of pm_runtime_dont_use_autosuspend() already handles the
   case of being called when autosuspend wasn't enabled.

Suggested-by: Laurent Pinchart <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Reviewed-by: Ulf Hansson <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Stable-dep-of: 3d07a411b4fa ("drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks")
Signed-off-by: Amit Pundir <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2024-02-23 08:25:14 +01:00
..
firmware_loader firmware_loader: use kernel credentials when reading firmware 2022-05-25 09:14:38 +02:00
power PM: runtime: Have devm_pm_runtime_enable() handle pm_runtime_dont_use_autosuspend() 2024-02-23 08:25:14 +01:00
regmap regmap: prevent noinc writes from clobbering cache 2023-11-20 10:30:15 +01:00
test driver core: test_async: fix an error code 2023-09-23 10:59:50 +02:00
arch_topology.c arm64: topology: move store_cpu_topology() to shared code 2022-10-29 10:20:36 +02:00
attribute_container.c
base.h
bus.c driver: base: fix UAF when driver_attach failed 2022-06-14 18:11:54 +02:00
cacheinfo.c
class.c class: fix possible memory leak in __class_register() 2023-01-18 11:41:21 +01:00
component.c
container.c
core.c drivers: core: fix kernel-doc markup for dev_err_probe() 2023-08-11 11:54:02 +02:00
cpu.c x86/speculation: Add Gather Data Sampling mitigation 2023-08-08 19:56:35 +02:00
dd.c driver core: Release all resources during unbind before updating device links 2023-12-08 08:44:22 +01:00
devcon.c
devcoredump.c devcoredump: Send uevent once devcd is ready 2023-12-13 18:18:18 +01:00
devres.c
devtmpfs.c
driver.c driver: platform: Add helper for safer setting of driver_override 2023-11-08 11:23:39 +01:00
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c
module.c
node.c drivers/base/node.c: fix compaction sysfs file leak 2022-06-14 18:11:41 +02:00
pinctrl.c
platform-msi.c
platform.c driver: platform: Add helper for safer setting of driver_override 2023-11-08 11:23:39 +01:00
property.c
soc.c
swnode.c software node: Let args be NULL in software_node_get_reference_args 2024-01-25 14:34:31 -08:00
syscore.c
topology.c
transport_class.c