aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/hid-wiimote-ext.c3
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)
585 } else { 585 } else {
586 tmp = val[i] - ext->calib[i][1]; 586 tmp = val[i] - ext->calib[i][1];
587 tmp *= 1700; 587 tmp *= 1700;
588 tmp /= ext->calib[i][2] - ext->calib[i][1] + 1700; 588 tmp /= ext->calib[i][2] - ext->calib[i][1];
589 tmp += 1700;
589 } 590 }
590 val[i] = tmp; 591 val[i] = tmp;
591 } 592 }