]> git.itanic.dy.fi Git - linux-stable/commit
i2c: designware: Use DIV_ROUND_CLOSEST() macro
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 12 Jul 2021 14:20:26 +0000 (17:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:23:23 +0000 (08:23 +0100)
commit8949ef3a7a0c938e3813f79085af97f32d060347
treed784b66d209e0ddc6238ec465392ed93f827685f
parent8ebc2efcb6d6731c12a3c3b18f9c2d17b651e888
i2c: designware: Use DIV_ROUND_CLOSEST() macro

[ Upstream commit c045214a0f31dd5d6be716ed2f119b57b6c5d3a2 ]

Instead of open-coding DIV_ROUND_CLOSEST() and similar use the macros directly.
While at it, replace numbers with predefined SI metric prefixes.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Stable-dep-of: c8c37bc51451 ("i2c: designware: use casting of u64 in clock multiplication to avoid overflow")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-designware-common.c
drivers/i2c/busses/i2c-designware-platdrv.c