[PATCH v3 04/10] devfreq: Use HZ macros

From: Daniel Lezcano
Date: Mon Aug 16 2021 - 07:47:53 EST


HZ unit conversion macros are available in units.h, use them and
remove the duplicate definition.

The new macro has an unsigned long type.

All the code is dealing with unsigned long and the code using the
macro is doing a coercitive cast to unsigned long.

Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
Reviewed-by: Christian Eggers <ceggers@xxxxxxx>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Acked-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
---
drivers/devfreq/devfreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 28f3e0ba6cdd..85faa7a5c7d1 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -27,6 +27,7 @@
#include <linux/hrtimer.h>
#include <linux/of.h>
#include <linux/pm_qos.h>
+#include <linux/units.h>
#include "governor.h"

#define CREATE_TRACE_POINTS
@@ -34,7 +35,6 @@

#define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name) ? true : false)
#define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ? true : false)
-#define HZ_PER_KHZ 1000

static struct class *devfreq_class;
static struct dentry *devfreq_debugfs;
--
2.25.1