summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2026-01-14 12:28:08 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2026-01-21 18:29:23 +0300
commit8672be1c1aae98ca96e520bb71245228a1b65f8d (patch)
tree3487050d250a6f671cb9d3741b0e21c2d4ee36f5
parent78c24e67d6f85d176af1ce29932dc215273c3957 (diff)
downloadlinux-8672be1c1aae98ca96e520bb71245228a1b65f8d.tar.xz
thermal/drivers/stm32: Use predefined HZ_PER_MHZ instead of a custom one
Use predefined HZ_PER_MHZ instead of a custom one. No functional changes. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260114092808.273695-1-andriy.shevchenko@linux.intel.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--drivers/thermal/st/stm_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c
index 6e90eb9f414d..5d8170bfb382 100644
--- a/drivers/thermal/st/stm_thermal.c
+++ b/drivers/thermal/st/stm_thermal.c
@@ -16,6 +16,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/thermal.h>
+#include <linux/units.h>
#include "../thermal_hwmon.h"
@@ -76,7 +77,6 @@
/* Constants */
#define ADJUST 100
-#define ONE_MHZ 1000000
#define POLL_TIMEOUT 5000
#define STARTUP_TIME 40
#define TS1_T0_VAL0 30000 /* 30 celsius */
@@ -205,7 +205,7 @@ static int stm_thermal_calibration(struct stm_thermal_sensor *sensor)
return -EINVAL;
prescaler = 0;
- clk_freq /= ONE_MHZ;
+ clk_freq /= HZ_PER_MHZ;
if (clk_freq) {
while (prescaler <= clk_freq)
prescaler++;