diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-08-28 13:59:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-12 14:01:04 +0300 |
commit | 57a72530fe6590fd20d2201bb7b625b76cd05cad (patch) | |
tree | 7f7588d2e518622dbf21ce3ae9c2d1da513d08a1 /rust/helpers/helpers.c | |
parent | e94870b370ec9e926853bd267505da9ba1794039 (diff) | |
download | linux-57a72530fe6590fd20d2201bb7b625b76cd05cad.tar.xz |
driver core/PM: Set power.no_callbacks along with power.no_pm
commit c2ce2453413d429e302659abc5ace634e873f6f5 upstream.
Devices with power.no_pm set are not expected to need any power
management at all, so modify device_set_pm_not_required() to set
power.no_callbacks for them too in case runtime PM will be enabled
for any of them (which in principle may be done for convenience if
such a device participates in a dependency chain).
Since device_set_pm_not_required() must be called before device_add()
or it would not have any effect, it can update power.no_callbacks
without locking, unlike pm_runtime_no_callbacks() that can be called
after registering the target device.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: stable <stable@kernel.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/1950054.tdWV9SEqCh@rafael.j.wysocki
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions