am c4f4e5e2: am cd8b953e: Merge changes I2d3fef08,Idb828aa4,Ica764b1f,I9ae8887b,I376fad86,I4d00a9dd

* commit 'c4f4e5e2550d730b56a9d27693d23f07a601d5c0':
  libion: update to latest uapi header
  libion: return -errno from ion_close
  libion: add include for size_t
  libion: add NULL checks
  libion: clean up whitespace
  libion: move ion.h into local include directory
diff --git a/charger/charger.c b/charger/charger.c
index 66ddeaf..dda24ae 100644
--- a/charger/charger.c
+++ b/charger/charger.c
@@ -67,6 +67,7 @@
 #define BATTERY_FULL_THRESH     95
 
 #define LAST_KMSG_PATH          "/proc/last_kmsg"
+#define LAST_KMSG_PSTORE_PATH   "/sys/fs/pstore/console-ramoops"
 #define LAST_KMSG_MAX_SZ        (32 * 1024)
 
 #define LOGE(x...) do { KLOG_ERROR("charger", x); } while (0)
@@ -211,10 +212,14 @@
     LOGI("\n");
     LOGI("*************** LAST KMSG ***************\n");
     LOGI("\n");
-    buf = load_file(LAST_KMSG_PATH, &sz);
+    buf = load_file(LAST_KMSG_PSTORE_PATH, &sz);
+
     if (!buf || !sz) {
-        LOGI("last_kmsg not found. Cold reset?\n");
-        goto out;
+        buf = load_file(LAST_KMSG_PATH, &sz);
+        if (!buf || !sz) {
+            LOGI("last_kmsg not found. Cold reset?\n");
+            goto out;
+        }
     }
 
     len = min(sz, LAST_KMSG_MAX_SZ);