hwmon: (scmi) Update hwmon internal scale data type
authorCristian Marussi <cristian.marussi@arm.com>
Thu, 19 Nov 2020 17:49:03 +0000 (17:49 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Sun, 22 Nov 2020 18:00:14 +0000 (18:00 +0000)
Use an int to calculate scale values inside scmi_hwmon_scale() to match
the updated scale data type in struct scmi_sensor_info.

Link: https://lore.kernel.org/r/20201119174906.43862-4-cristian.marussi@arm.com
Cc: linux-hwmon@vger.kernel.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/hwmon/scmi-hwmon.c

index 09ce30c..17d064e 100644 (file)
@@ -30,7 +30,7 @@ static inline u64 __pow10(u8 x)
 
 static int scmi_hwmon_scale(const struct scmi_sensor_info *sensor, u64 *value)
 {
-       s8 scale = sensor->scale;
+       int scale = sensor->scale;
        u64 f;
 
        switch (sensor->type) {