Skip to content

Commit 688d389

Browse files
andy-shevAndi Shyti
authored andcommitted
i2c: designware: Use better constants from units.h
When we use constants in a time or frequency related contexts, it's better to utilise the respective definitions that have encoded units in them. This will make code better to read and understand. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com> Link: https://lore.kernel.org/r/20250416101702.2128740-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
1 parent 6df6531 commit 688d389

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/i2c/busses/i2c-designware-platdrv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
3636
{
37-
return clk_get_rate(dev->clk) / KILO;
37+
return clk_get_rate(dev->clk) / HZ_PER_KHZ;
3838
}
3939

4040
#ifdef CONFIG_OF

0 commit comments

Comments
 (0)