summaryrefslogtreecommitdiff
path: root/drivers/thermal/sun8i_thermal.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-01-23 13:23:19 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2023-01-24 13:43:22 +0300
commitd69e7041a39c24de8c935b82c1edae6490be5b4d (patch)
treeb957763afb205da2231d6823302df8b5f8d97fa6 /drivers/thermal/sun8i_thermal.c
parentf8887fdcf2a7da2d05de95a81ec35571f2323c2e (diff)
downloadlinux-d69e7041a39c24de8c935b82c1edae6490be5b4d.tar.xz
thermal/drivers/sun8i: Convert to use macro
Use TEMP_CALIB_MASK macro instead of raw number. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230123102319.37710-1-frank.li@vivo.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/thermal/sun8i_thermal.c')
-rw-r--r--drivers/thermal/sun8i_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index e64d06d1328c..497beac63e5d 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -210,7 +210,7 @@ static int sun8i_h3_ths_calibrate(struct ths_device *tmdev,
regmap_update_bits(tmdev->regmap,
SUN8I_THS_TEMP_CALIB + (4 * (i >> 1)),
- 0xfff << offset,
+ TEMP_CALIB_MASK << offset,
caldata[i] << offset);
}
@@ -271,7 +271,7 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev,
offset = (i % 2) * 16;
regmap_update_bits(tmdev->regmap,
SUN50I_H6_THS_TEMP_CALIB + (i / 2 * 4),
- 0xfff << offset,
+ TEMP_CALIB_MASK << offset,
cdata << offset);
}