Skip to content

Commit 4dc1372

Browse files
Yicong Yangwsakernel
authored andcommitted
i2c: hisi: use HZ_PER_KHZ macro in units.h
HZ macros has been centralized in units.h since [1]. Use it to avoid duplicated definition. [1] commit e2c7703 ("units: add the HZ macros") Signed-off-by: Yicong Yang <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 4c0ad47 commit 4dc1372

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/i2c/busses/i2c-hisi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/mod_devicetable.h>
1616
#include <linux/platform_device.h>
1717
#include <linux/property.h>
18+
#include <linux/units.h>
1819

1920
#define HISI_I2C_FRAME_CTRL 0x0000
2021
#define HISI_I2C_FRAME_CTRL_SPEED_MODE GENMASK(1, 0)
@@ -80,8 +81,6 @@
8081
#define HISI_I2C_TX_F_AE_THRESH 1
8182
#define HISI_I2C_RX_F_AF_THRESH 60
8283

83-
#define HZ_PER_KHZ 1000
84-
8584
#define NSEC_TO_CYCLES(ns, clk_rate_khz) \
8685
DIV_ROUND_UP_ULL((clk_rate_khz) * (ns), NSEC_PER_MSEC)
8786

0 commit comments

Comments
 (0)