From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Subject: [PATCH v2 1/3] clk: x86: lpss-atom: Use predefined constants from units.h
Date: Tue, 24 Feb 2026 13:09:20 +0100 [thread overview]
Message-ID: <20260224121159.3503754-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20260224121159.3503754-1-andriy.shevchenko@linux.intel.com>
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@linux.intel.com>
---
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
next prev parent reply other threads:[~2026-02-24 12:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 12:09 [PATCH v2 0/3] clk: x86: lpss-atom: A couple of cleanups and a feature Andy Shevchenko
2026-02-24 12:09 ` Andy Shevchenko [this message]
2026-02-25 22:33 ` [PATCH v2 1/3] clk: x86: lpss-atom: Use predefined constants from units.h Brian Masney
2026-02-24 12:09 ` [PATCH v2 2/3] clk: x86: lpss-atom: Use temporary variable for struct device Andy Shevchenko
2026-02-25 22:33 ` Brian Masney
2026-02-24 12:09 ` [PATCH v2 3/3] clk: x86: lpss-atom: Read frequency from the property Andy Shevchenko
2026-02-25 22:33 ` Brian Masney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260224121159.3503754-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox