Patchwork [3/5] i2c: sirf: fix the typo for setting bitrate to less than 100k

login
register
mail settings
Submitter Barry Song
Date Aug. 13, 2013, 9:11 a.m.
Message ID <1376385091-30597-4-git-send-email-Baohua.Song@csr.com>
Download mbox | patch
Permalink /patch/266758/
State Accepted
Headers show

Comments

Barry Song - Aug. 13, 2013, 9:11 a.m.
From: Zhiwu Song <Zhiwu.Song@csr.com>

there is a typo before, it makes the final bitrate wrong, this patch fixes
it.

Signed-off-by: Zhiwu Song <Zhiwu.Song@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
 drivers/i2c/busses/i2c-sirf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c
index 45a8881..746388f 100644
--- a/drivers/i2c/busses/i2c-sirf.c
+++ b/drivers/i2c/busses/i2c-sirf.c
@@ -357,7 +357,7 @@  static int i2c_sirfsoc_probe(struct platform_device *pdev)
 
 	if (bitrate < 100000)
 		regval =
-			(2 * ctrl_speed) / (2 * bitrate * 11);
+			(2 * ctrl_speed) / (bitrate * 11);
 	else
 		regval = ctrl_speed / (bitrate * 5);