projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acdb602
)
IRDA: cnt is off by 1
author
Roel Kluin
<roel.kluin@gmail.com>
Fri, 13 Feb 2009 00:42:31 +0000
(16:42 -0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 13 Feb 2009 00:42:31 +0000
(16:42 -0800)
If no prior break occurs, cnt reaches 101 after the loop, so we are still able
to change speed when cnt has become 100.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/mcs7780.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/irda/mcs7780.c
b/drivers/net/irda/mcs7780.c
index 7eafdca19f34a8da53ca9e61f7dba65f54cfccf2..85e88daab21a1f326952c6486694771a3dcbe43f 100644
(file)
--- a/
drivers/net/irda/mcs7780.c
+++ b/
drivers/net/irda/mcs7780.c
@@
-585,7
+585,7
@@
static int mcs_speed_change(struct mcs_cb *mcs)
mcs_get_reg(mcs, MCS_RESV_REG, &rval);
} while(cnt++ < 100 && (rval & MCS_IRINTX));
- if
(cnt >=
100) {
+ if
(cnt >
100) {
IRDA_ERROR("unable to change speed\n");
ret = -EIO;
goto error;