[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210223203004.7219-1-daniel.lezcano@linaro.org>
Date: Tue, 23 Feb 2021 21:30:01 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: rafael@...nel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Lukasz Luba <lukasz.luba@....com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 1/2] units: Add the HZ_PER_KHZ macro
The macro for the unit conversion for frequency is duplicated in
different places.
Provide this macro in the 'units' header, so it can be reused.
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
---
include/linux/units.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/units.h b/include/linux/units.h
index dcc30a53fa93..218ec0d314b6 100644
--- a/include/linux/units.h
+++ b/include/linux/units.h
@@ -4,6 +4,10 @@
#include <linux/math.h>
+#define HZ_PER_KHZ 1000L
+#define KHZ_PER_MHZ 1000L
+#define HZ_PER_MHZ 1000000L
+
#define MILLIWATT_PER_WATT 1000L
#define MICROWATT_PER_MILLIWATT 1000L
#define MICROWATT_PER_WATT 1000000L
--
2.17.1
Powered by blists - more mailing lists