Skip to content

Commit 8672be1

Browse files
andy-shevdlezcano
authored andcommitted
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>
1 parent 78c24e6 commit 8672be1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/thermal/st/stm_thermal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/of.h>
1717
#include <linux/platform_device.h>
1818
#include <linux/thermal.h>
19+
#include <linux/units.h>
1920

2021
#include "../thermal_hwmon.h"
2122

@@ -76,7 +77,6 @@
7677

7778
/* Constants */
7879
#define ADJUST 100
79-
#define ONE_MHZ 1000000
8080
#define POLL_TIMEOUT 5000
8181
#define STARTUP_TIME 40
8282
#define TS1_T0_VAL0 30000 /* 30 celsius */
@@ -205,7 +205,7 @@ static int stm_thermal_calibration(struct stm_thermal_sensor *sensor)
205205
return -EINVAL;
206206

207207
prescaler = 0;
208-
clk_freq /= ONE_MHZ;
208+
clk_freq /= HZ_PER_MHZ;
209209
if (clk_freq) {
210210
while (prescaler <= clk_freq)
211211
prescaler++;

0 commit comments

Comments
 (0)