Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Daniel Lezcano
8672be1c 78c24e67

+2 -2
+2 -2
drivers/thermal/st/stm_thermal.c
··· 16 16 #include <linux/of.h> 17 17 #include <linux/platform_device.h> 18 18 #include <linux/thermal.h> 19 + #include <linux/units.h> 19 20 20 21 #include "../thermal_hwmon.h" 21 22 ··· 77 76 78 77 /* Constants */ 79 78 #define ADJUST 100 80 - #define ONE_MHZ 1000000 81 79 #define POLL_TIMEOUT 5000 82 80 #define STARTUP_TIME 40 83 81 #define TS1_T0_VAL0 30000 /* 30 celsius */ ··· 205 205 return -EINVAL; 206 206 207 207 prescaler = 0; 208 - clk_freq /= ONE_MHZ; 208 + clk_freq /= HZ_PER_MHZ; 209 209 if (clk_freq) { 210 210 while (prescaler <= clk_freq) 211 211 prescaler++;