UPSTREAM: thermal: use %d to print S32 parameters
authorLeo Yan <leo.yan@linaro.org>
Tue, 29 Mar 2016 11:24:15 +0000 (19:24 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 13 May 2016 02:33:16 +0000 (10:33 +0800)
Power allocator's parameters are S32 type, so use %d to print them.

Change-Id: Iae45ef17e4375320a0f4b2fdeab034ae76763ff6
Acked-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 15333e3af1de37b1b214b28c85fe9a7b257fb92c)

drivers/thermal/thermal_core.c

index b86a2b36c924932cd2e86f4f98312ec9b7683a72..05c66b796b2052f5d22bc4d9278133153601d477 100644 (file)
@@ -1000,7 +1000,7 @@ static DEVICE_ATTR(sustainable_power, S_IWUSR | S_IRUGO, sustainable_power_show,
        struct thermal_zone_device *tz = to_thermal_zone(dev);          \
                                                                        \
        if (tz->tzp)                                                    \
-               return sprintf(buf, "%u\n", tz->tzp->name);             \
+               return sprintf(buf, "%d\n", tz->tzp->name);             \
        else                                                            \
                return -EIO;                                            \
        }                                                               \