[PATCH v2 1/3] clk: x86: lpss-atom: Use predefined constants from units.h
From: Andy Shevchenko
Date: Tue Feb 24 2026 - 07:12:10 EST
Use predefined constants from units.h to make code robust against typos
like how many zeros to put.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/clk/x86/clk-lpss-atom.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/x86/clk-lpss-atom.c b/drivers/clk/x86/clk-lpss-atom.c
index aa9d0bb98f8b..fb8637c472f2 100644
--- a/drivers/clk/x86/clk-lpss-atom.c
+++ b/drivers/clk/x86/clk-lpss-atom.c
@@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/platform_data/x86/clk-lpss.h>
#include <linux/platform_device.h>
+#include <linux/units.h>
static int lpss_atom_clk_probe(struct platform_device *pdev)
{
@@ -25,7 +26,7 @@ static int lpss_atom_clk_probe(struct platform_device *pdev)
/* LPSS free running clock */
drvdata->name = "lpss_clk";
clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL,
- 0, 100000000);
+ 0, 100 * HZ_PER_MHZ);
if (IS_ERR(clk))
return PTR_ERR(clk);
--
2.50.1