Skip to contentSkip to conversation

thermal: stm32: Use predefined HZ_PER_MHZ instead of a custom one

PATCH Applied Andy Shevchenko 2 participants 2 messages Jan 14 – Jan 21

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: stm32: Use predefined HZ_PER_MHZ instead of a custom one

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

---
 drivers/thermal/st/stm_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/st/stm_thermal.c +2 -2
index 6e90eb9f414d..5d8170bfb382 100644
@@ -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++;
Signature · 1 line
2.50.1
#1 lore raw
Quoted 4 lines · Andy Shevchenko

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

---

Applied, thanks

Signature · 5 lines
<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