public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: hisi: use HZ_PER_KHZ macro in units.h
@ 2022-06-10  7:51 Yicong Yang
  2022-06-15 20:41 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Yicong Yang @ 2022-06-10  7:51 UTC (permalink / raw)
  To: wsa, linux-i2c; +Cc: yangyicong, andriy.shevchenko, daniel.lezcano

HZ macros has been centralized in units.h since [1]. Use it to avoid
duplicated definition.

[1] commit e2c77032fcbe ("units: add the HZ macros")

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
---
 drivers/i2c/busses/i2c-hisi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-hisi.c b/drivers/i2c/busses/i2c-hisi.c
index acf394812061..76c3d8f6fc3c 100644
--- a/drivers/i2c/busses/i2c-hisi.c
+++ b/drivers/i2c/busses/i2c-hisi.c
@@ -15,6 +15,7 @@
 #include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
+#include <linux/units.h>
 
 #define HISI_I2C_FRAME_CTRL		0x0000
 #define   HISI_I2C_FRAME_CTRL_SPEED_MODE	GENMASK(1, 0)
@@ -80,8 +81,6 @@
 #define HISI_I2C_TX_F_AE_THRESH		1
 #define HISI_I2C_RX_F_AF_THRESH		60
 
-#define HZ_PER_KHZ	1000
-
 #define NSEC_TO_CYCLES(ns, clk_rate_khz) \
 	DIV_ROUND_UP_ULL((clk_rate_khz) * (ns), NSEC_PER_MSEC)
 
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: hisi: use HZ_PER_KHZ macro in units.h
  2022-06-10  7:51 [PATCH] i2c: hisi: use HZ_PER_KHZ macro in units.h Yicong Yang
@ 2022-06-15 20:41 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2022-06-15 20:41 UTC (permalink / raw)
  To: Yicong Yang; +Cc: linux-i2c, andriy.shevchenko, daniel.lezcano

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

On Fri, Jun 10, 2022 at 03:51:06PM +0800, Yicong Yang wrote:
> HZ macros has been centralized in units.h since [1]. Use it to avoid
> duplicated definition.
> 
> [1] commit e2c77032fcbe ("units: add the HZ macros")
> 
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-15 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-10  7:51 [PATCH] i2c: hisi: use HZ_PER_KHZ macro in units.h Yicong Yang
2022-06-15 20:41 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox