public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] thermal: stm32: Use predefined HZ_PER_MHZ instead of a custom one
@ 2026-01-14  9:28 Andy Shevchenko
  2026-01-21 15:29 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2026-01-14  9:28 UTC (permalink / raw)
  To: Andy Shevchenko, linux-pm, linux-stm32, linux-arm-kernel,
	linux-kernel
  Cc: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
	Maxime Coquelin, Alexandre Torgue

Use predefined HZ_PER_MHZ instead of a custom one. No functional changes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/thermal/st/stm_thermal.c | 4 ++--
 1 file 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++;
-- 
2.50.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] thermal: stm32: Use predefined HZ_PER_MHZ instead of a custom one
  2026-01-14  9:28 [PATCH v1 1/1] thermal: stm32: Use predefined HZ_PER_MHZ instead of a custom one Andy Shevchenko
@ 2026-01-21 15:29 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2026-01-21 15:29 UTC (permalink / raw)
  To: Andy Shevchenko, linux-pm, linux-stm32, linux-arm-kernel,
	linux-kernel
  Cc: Rafael J. Wysocki, Zhang Rui, Lukasz Luba, Maxime Coquelin,
	Alexandre Torgue

On 1/14/26 10:28, Andy Shevchenko wrote:
> Use predefined HZ_PER_MHZ instead of a custom one. No functional changes.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-21 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14  9:28 [PATCH v1 1/1] thermal: stm32: Use predefined HZ_PER_MHZ instead of a custom one Andy Shevchenko
2026-01-21 15:29 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox