]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i2c: riic: Simplify unsupported bus speed handling
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 22 Aug 2024 14:45:54 +0000 (16:45 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Mon, 9 Sep 2024 22:36:43 +0000 (00:36 +0200)
commit71dacb2565ed9d2839adb8e2a80ef30185c29035
tree309fac96e22e8ce8b31c576f56391ee8a5380d1d
parentbc07fb417007b323d34651be20b9135480a947dc
i2c: riic: Simplify unsupported bus speed handling

Simplify checking for unsupported bus speeds and reporting errors by
factoring out the calculation of the maximum bus speed, and by using the
dev_err_probe() helper.

While at it, use "%u" for u32, and improve the error message.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-riic.c