[PATCH v4 1/2] ACPI: APD: Convert fixed clock rates to use HZ_PER_MHZ

"clarke.li" <[email protected]>
Newsgroups org.kernel.vger.linux-acpi,org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
From: Hongnan Li <[email protected]>

Use HZ_PER_MHZ multiplier for fixed_clk_rate values to
improve readability.

Signed-off-by: Hongnan Li <[email protected]>
---
 drivers/acpi/acpi_apd.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 008bd0552cb7..275027ebd01f 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -14,6 +14,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/clk-fch.h>
 #include <linux/platform_device.h>
+#include <linux/units.h>
 
 #include "internal.h"
 
@@ -110,17 +111,17 @@ static int fch_misc_setup(struct apd_private_data *pdata)
 
 static const struct apd_device_desc cz_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 133000000,
+	.fixed_clk_rate = 133 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc wt_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 150000000,
+	.fixed_clk_rate = 150 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc wt_i3c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 125000000,
+	.fixed_clk_rate = 125 * HZ_PER_MHZ,
 };
 
 static struct property_entry uart_properties[] = {
@@ -132,7 +133,7 @@ static struct property_entry uart_properties[] = {
 
 static const struct apd_device_desc cz_uart_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 48000000,
+	.fixed_clk_rate = 48 * HZ_PER_MHZ,
 	.properties = uart_properties,
 };
 
@@ -144,52 +145,52 @@ static const struct apd_device_desc fch_misc_desc = {
 #ifdef CONFIG_ARM64
 static const struct apd_device_desc xgene_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 100000000,
+	.fixed_clk_rate = 100 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc vulcan_spi_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 133000000,
+	.fixed_clk_rate = 133 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc hip07_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 200000000,
+	.fixed_clk_rate = 200 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc hip08_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 250000000,
+	.fixed_clk_rate = 250 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc hip08_lite_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 125000000,
+	.fixed_clk_rate = 125 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc thunderx2_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 125000000,
+	.fixed_clk_rate = 125 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc nxp_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 350000000,
+	.fixed_clk_rate = 350 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc hip08_spi_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 250000000,
+	.fixed_clk_rate = 250 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc leca_spi_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 400000000,
+	.fixed_clk_rate = 400 * HZ_PER_MHZ,
 };
 
 static const struct apd_device_desc leca_i2c_desc = {
 	.setup = acpi_apd_setup,
-	.fixed_clk_rate = 250000000,
+	.fixed_clk_rate = 250 * HZ_PER_MHZ,
 };
 
 #endif /* CONFIG_ARM64 */
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.