Since we have generic definitions for bus frequencies, let's use them. Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/i2c/busses/i2c-uniphier-f.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c index 4241aac79e7e..47b78ebfb291 100644 --- a/drivers/i2c/busses/i2c-uniphier-f.c +++ b/drivers/i2c/busses/i2c-uniphier-f.c @@ -73,8 +73,6 @@ #define UNIPHIER_FI2C_BYTE_WISE BIT(3) #define UNIPHIER_FI2C_DEFER_STOP_COMP BIT(4) -#define UNIPHIER_FI2C_DEFAULT_SPEED 100000 -#define UNIPHIER_FI2C_MAX_SPEED 400000 #define UNIPHIER_FI2C_FIFO_SIZE 8 struct uniphier_fi2c_priv { @@ -537,9 +535,9 @@ static int uniphier_fi2c_probe(struct platform_device *pdev) } if (of_property_read_u32(dev->of_node, "clock-frequency", &bus_speed)) - bus_speed = UNIPHIER_FI2C_DEFAULT_SPEED; + bus_speed = I2C_STANDARD_MODE_FREQ; - if (!bus_speed || bus_speed > UNIPHIER_FI2C_MAX_SPEED) { + if (!bus_speed || bus_speed > I2C_FAST_MODE_FREQ) { dev_err(dev, "invalid clock-frequency %d\n", bus_speed); return -EINVAL; } -- 2.25.0