summaryrefslogtreecommitdiff
path: root/src/vendorcode/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/google')
-rw-r--r--src/vendorcode/google/chromeos/elog.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/vendorcode/google/chromeos/elog.c b/src/vendorcode/google/chromeos/elog.c
index 4dd8b193e8..523b7c46eb 100644
--- a/src/vendorcode/google/chromeos/elog.c
+++ b/src/vendorcode/google/chromeos/elog.c
@@ -8,32 +8,21 @@
static void elog_add_boot_reason(void *unused)
{
- int rec = vboot_recovery_mode_enabled();
- int dev = vboot_developer_mode_enabled();
-
- if (!rec && !dev)
- return;
+ const int rec = vboot_recovery_mode_enabled();
+ const int dev = vboot_developer_mode_enabled();
if (rec) {
- u8 reason = vboot_check_recovery_request();
+ const u8 reason = vboot_check_recovery_request();
elog_add_event_byte(ELOG_TYPE_CROS_RECOVERY_MODE, reason);
- printk(BIOS_DEBUG, "%s: Logged recovery mode boot%s, "
- "reason: 0x%02x\n", __func__,
- dev ? " (Dev-switch on)" : "", reason);
+ printk(BIOS_DEBUG, "%s: Logged recovery mode boot%s, reason: 0x%02x\n",
+ __func__, dev ? " (Dev-switch on)" : "", reason);
}
- if (dev) {
- int log_event = 1;
-
- /* Skip logging developer mode in ACPI resume path */
- if (acpi_is_wakeup())
- log_event = 0;
+ /* Skip logging developer mode in ACPI resume path */
+ if (dev && !acpi_is_wakeup()) {
- if (log_event) {
- elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE);
- printk(BIOS_DEBUG, "%s: Logged dev mode boot\n",
- __func__);
- }
+ elog_add_event(ELOG_TYPE_CROS_DEVELOPER_MODE);
+ printk(BIOS_DEBUG, "%s: Logged dev mode boot\n", __func__);
}
}