Since we have generic definitions for bus frequencies, let's use them. Cc: Chris Brandt <chris.brandt@xxxxxxxxxxx> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/i2c/busses/i2c-riic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c index 800414886f6b..051649e2afe5 100644 --- a/drivers/i2c/busses/i2c-riic.c +++ b/drivers/i2c/busses/i2c-riic.c @@ -287,10 +287,10 @@ static int riic_init_hw(struct riic_dev *riic, struct i2c_timings *t) pm_runtime_get_sync(riic->adapter.dev.parent); - if (t->bus_freq_hz > 400000) { + if (t->bus_freq_hz > I2C_FAST_MODE_FREQ) { dev_err(&riic->adapter.dev, - "unsupported bus speed (%dHz). 400000 max\n", - t->bus_freq_hz); + "unsupported bus speed (%dHz). %d max\n", + t->bus_freq_hz, I2C_FAST_MODE_FREQ); ret = -EINVAL; goto out; } -- 2.25.0