ISO C90 forbids mixed declarations and code
remove unused battery lookup tables
solved all kernel warnings