]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PM: sysfs: Move debug runtime PM attributes to runtime_attrs[]
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 May 2025 14:29:37 +0000 (16:29 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 9 May 2025 13:59:27 +0000 (15:59 +0200)
commit495e7a6389c85003fc1ef4e893f0845e12fa9b95
treeb5eedfc758e997ced76ece7818904103f7905a94
parent73db799bf5efc5a04654bb3ff6c9bf63a0dfa473
PM: sysfs: Move debug runtime PM attributes to runtime_attrs[]

Some of the debug sysfs attributes for runtime PM are located
in the power_attrs[] table, so they are exposed even in the
pm_runtime_has_no_callbacks() case, unlike the other non-debug
sysfs attributes for runtime PM, which may be confusing.

Moreover, dev_attr_runtime_status.attr appears in two
places, which effectively causes it to be always exposed if
CONFIG_PM_ADVANCED_DEBUG is set, but otherwise it is exposed
only when pm_runtime_has_no_callbacks() returns 'false'.

Address this by putting all sysfs attributes for runtime PM into
runtime_attrs[].

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/12677254.O9o76ZdvQC@rjwysocki.net
drivers/base/power/sysfs.c