]> www.infradead.org Git - users/dwmw2/linux.git/commit
PM: wakeup: simplify the output logic of pm_show_wakelocks()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jan 2022 18:44:20 +0000 (19:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 17:23:03 +0000 (18:23 +0100)
commitcf94a8a3ff3d7aa06742f1beb5166fa45ba72122
treecca695c02fe46b5258611d52e7c41a79fceaf8a1
parenta23a59717f9f01a49394488f515550f9382fbada
PM: wakeup: simplify the output logic of pm_show_wakelocks()

commit c9d967b2ce40d71e968eb839f36c936b8a9cf1ea upstream.

The buffer handling in pm_show_wakelocks() is tricky, and hopefully
correct.  Ensure it really is correct by using sysfs_emit_at() which
handles all of the tricky string handling logic in a PAGE_SIZE buffer
for us automatically as this is a sysfs file being read from.

Reviewed-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/power/wakelock.c