rx51_battery.patch - fixed voltage integer overflow
authorPali Rohár <pali.rohar@gmail.com>
Fri, 21 Sep 2012 18:43:13 +0000 (20:43 +0200)
committerPali Rohár <pali.rohar@gmail.com>
Fri, 21 Sep 2012 18:43:13 +0000 (20:43 +0200)
kernel-power-2.6.28/debian/patches/rx51_battery.patch

index 9571200..abd1166 100644 (file)
@@ -56,7 +56,7 @@
 +      int voltage = rx51_battery_read_adc(12);
 +      if (voltage < 0)
 +              return voltage;
-+      return 1000 * 10000 * voltage / 1705;
++      return 1000 * (10000 * voltage / 1705);
 +}
 +
 +/* Conversation table based on experimental data */