projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3155a09
)
HID: wiimote: fix weight conversion error for values > 17kg
author
Florian Echtler
<floe@butterbrot.org>
Mon, 17 Sep 2012 19:15:40 +0000
(21:15 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Tue, 18 Sep 2012 09:37:14 +0000
(11:37 +0200)
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-wiimote-ext.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/hid-wiimote-ext.c
b/drivers/hid/hid-wiimote-ext.c
index fc98cc9ed429515148ef9d825a2ad93d370b7405..bc85bf29062ea50c735a674b761ce688a5df0412 100644
(file)
--- 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;
}