diff options
author | Florian Echtler <floe@butterbrot.org> | 2012-09-17 21:15:40 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-09-18 11:37:14 +0200 |
commit | a2f6e4e009f13097acafd09cccf274fb5869dde2 (patch) | |
tree | 2489f3b2df7a1fd9124ab2b03e81d9ad3fef8247 /drivers/hid | |
parent | 3155a09fd5060190eea4f2585d55d6c5431837c4 (diff) | |
download | blackbird-op-linux-a2f6e4e009f13097acafd09cccf274fb5869dde2.tar.gz blackbird-op-linux-a2f6e4e009f13097acafd09cccf274fb5869dde2.zip |
HID: wiimote: fix weight conversion error for values > 17kg
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-wiimote-ext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-wiimote-ext.c b/drivers/hid/hid-wiimote-ext.c index fc98cc9ed429..bc85bf29062e 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; } |