Thread (4 messages) flat view 4 messages, 3 authors, 2012-09-18

Re: [PATCH] HID: wiimote: fix weight conversion error for values > 17kg

From: Jiri Kosina <hidden>
Date: 2012-09-18 09:38:36

On Mon, 17 Sep 2012, Florian Echtler wrote:
quoted hunk ↗ jump to hunk
Signed-Off-By: Florian Echtler <redacted>
---
 drivers/hid/hid-wiimote-ext.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-wiimote-ext.c b/drivers/hid/hid-wiimote-ext.c
index fc98cc9..bc85bf2 100644
--- a/drivers/hid/hid-wiimote-ext.c
+++ b/drivers/hid/hid-wiimote-ext.c
@@ -585,7 +585,8 @@ static void handler_balance_board(struct wiimote_ext *ext,
const __u8 *payload)
 		} else {
 			tmp = val[i] - ext->calib[i][1];
 			tmp *= 1700;
-			tmp /= ext->calib[i][2] - ext->calib[i][1] + 1700;
+			tmp /= ext->calib[i][2] - ext->calib[i][1];
+			tmp += 1700;
 		}
 		val[i] = tmp;
 	}
I am not sure how you managed to do it :) but there are stray whitespaces 
in the patch context.

I have fixed it manually and applied, but please keep fixing that in mind 
for any future submissions.

Thanks,

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help