i2c: drivers: Use generic definitions for bus frequencies
[sfrench/cifs-2.6.git] / drivers / i2c / busses / i2c-s3c2410.c
index c98ef4c4a0c9ea844c162a48811783762aa13331..5a5638e1daa1dd6658b7d987d938871c5f824709 100644 (file)
@@ -835,11 +835,11 @@ static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got)
        int freq;
 
        i2c->clkrate = clkin;
-       clkin /= 1000;          /* clkin now in KHz */
+       clkin /= 1000;  /* clkin now in KHz */
 
        dev_dbg(i2c->dev, "pdata desired frequency %lu\n", pdata->frequency);
 
-       target_frequency = pdata->frequency ? pdata->frequency : 100000;
+       target_frequency = pdata->frequency ?: I2C_MAX_STANDARD_MODE_FREQ;
 
        target_frequency /= 1000; /* Target frequency now in KHz */