I didn't know that, I haven't tried the new kernel yet. You should check if the voltage is > 1000 or the temp is > 100 before trying to divide it.
if(voltage>10000) last_battery_volts[idx] = voltage/1000; else last_battery_volts[idx] = voltage; if(temp>100) last_battery_temp[idx] = temp/10; else last_battery_temp[idx] = temp;