Since we have generic definitions for bus frequencies, let's use them. Cc: George Cherian <gcherian@xxxxxxxxxxx> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/i2c/busses/i2c-xlp9xx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-xlp9xx.c b/drivers/i2c/busses/i2c-xlp9xx.c index 8a873975cf12..4328b0fc6002 100644 --- a/drivers/i2c/busses/i2c-xlp9xx.c +++ b/drivers/i2c/busses/i2c-xlp9xx.c @@ -71,8 +71,6 @@ #define XLP9XX_I2C_SLAVEADDR_ADDR_SHIFT 1 #define XLP9XX_I2C_IP_CLK_FREQ 133000000UL -#define XLP9XX_I2C_DEFAULT_FREQ 100000 -#define XLP9XX_I2C_HIGH_FREQ 400000 #define XLP9XX_I2C_FIFO_SIZE 0x80U #define XLP9XX_I2C_TIMEOUT_MS 1000 #define XLP9XX_I2C_BUSY_TIMEOUT 50 @@ -476,12 +474,12 @@ static int xlp9xx_i2c_get_frequency(struct platform_device *pdev, err = device_property_read_u32(&pdev->dev, "clock-frequency", &freq); if (err) { - freq = XLP9XX_I2C_DEFAULT_FREQ; + freq = I2C_STANDARD_MODE_FREQ; dev_dbg(&pdev->dev, "using default frequency %u\n", freq); - } else if (freq == 0 || freq > XLP9XX_I2C_HIGH_FREQ) { + } else if (freq == 0 || freq > I2C_FAST_MODE_FREQ) { dev_warn(&pdev->dev, "invalid frequency %u, using default\n", freq); - freq = XLP9XX_I2C_DEFAULT_FREQ; + freq = I2C_STANDARD_MODE_FREQ; } priv->clk_hz = freq; -- 2.25.0