* Fixed broken switch statement - missing 'case' in front of labels
* Added default case to switch statement
* Removed unused variable
* Removed unused static functions
* Attempted to fix cases where functions are returning/not returning
data incorrectly.
* Attempted to fix i2c read which was returning an
* uninitialized/unused variable.
Signed-off-by: Noel Eck <noel.eck@intel.com>