mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
6df65313ed
commit
688d389cdf
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
|
||||
{
|
||||
return clk_get_rate(dev->clk) / KILO;
|
||||
return clk_get_rate(dev->clk) / HZ_PER_KHZ;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user