diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-03-26 18:53:28 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-04-13 14:54:16 -0700 |
commit | 3e3f766a5274d204780460e1879723b565296d34 (patch) | |
tree | abe2d07a76044848e8b1ebc873df3d82540fe35f /drivers | |
parent | 3c735e7437150e8615f26930c7819db85634276d (diff) |
Fix warnings introduced by I2C bus speed setting patch
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/fsl_i2c.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index dde057124e9..9f2c1eced4d 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -117,7 +117,6 @@ static unsigned int set_i2c_bus_speed(const struct fsl_i2c *dev, { unsigned short divider = min(i2c_clk / speed, (unsigned short) -1); unsigned int i; - u8 fdr, dfsr; /* * We want to choose an FDR/DFSR that generates an I2C bus speed that @@ -128,15 +127,15 @@ static unsigned int set_i2c_bus_speed(const struct fsl_i2c *dev, for (i = 0; i < ARRAY_SIZE(fsl_i2c_speed_map); i++) if (fsl_i2c_speed_map[i].divider >= divider) { + u8 fdr, dfsr; dfsr = fsl_i2c_speed_map[i].dfsr; fdr = fsl_i2c_speed_map[i].fdr; speed = i2c_clk / fsl_i2c_speed_map[i].divider; + writeb(fdr, &dev->fdr); /* set bus speed */ + writeb(dfsr, &dev->dfsrr); /* set default filter */ break; } - writeb(fdr, &dev->fdr); /* set bus speed */ - writeb(dfsr, &dev->dfsrr); /* set default filter */ - return speed; } |