From: Geert Uytterhoeven Date: Tue, 23 Feb 2016 16:49:18 +0000 (+0100) Subject: PM / Domains: Join state name and index in debugfs output X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0ba554e45c674181a3e5c42c7a6cccbbc75a0dd7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git PM / Domains: Join state name and index in debugfs output For low-power states, the state index is part of the state, hence join them with a hyphen in the /sys/kernel/debug/pm_genpd/pm_genpd_summary output. E.g. "off 0" becomes "off-0". Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Tested-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 01015d85ab64..9e59543d314c 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1892,7 +1892,7 @@ static int pm_genpd_summary_one(struct seq_file *s, if (WARN_ON(genpd->status >= ARRAY_SIZE(status_lookup))) goto exit; if (genpd->status == GPD_STATE_POWER_OFF) - snprintf(state, sizeof(state), "%s %u", + snprintf(state, sizeof(state), "%s-%u", status_lookup[genpd->status], genpd->state_idx); else snprintf(state, sizeof(state), "%s",