diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-12 22:39:07 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-12 22:39:07 -0800 |
| commit | 337b3cd854c583a551f853ad37fd3318add600d4 (patch) | |
| tree | d8c0ca3f4875863da2c1fd6cf414ee36e632f21c | |
| parent | cfa822c282cf74079ceb07ec4813bbc13b1c27c5 (diff) | |
| parent | 56a6f88a34d1c0e0a12037c3330ef5ad53deef85 (diff) | |
Merge "input: qpnp-power-on: set boot_reason when system-reset exists"
| -rw-r--r-- | drivers/input/misc/qpnp-power-on.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/misc/qpnp-power-on.c b/drivers/input/misc/qpnp-power-on.c index e1c16aa5da43..add11d47ea2f 100644 --- a/drivers/input/misc/qpnp-power-on.c +++ b/drivers/input/misc/qpnp-power-on.c @@ -2084,6 +2084,9 @@ static int qpnp_pon_probe(struct platform_device *pdev) return rc; } + if (sys_reset) + boot_reason = ffs(pon_sts); + index = ffs(pon_sts) - 1; cold_boot = !qpnp_pon_is_warm_reset(); if (index >= ARRAY_SIZE(qpnp_pon_reason) || index < 0) { @@ -2297,8 +2300,6 @@ static int qpnp_pon_probe(struct platform_device *pdev) list_add(&pon->list, &spon_dev_list); spin_unlock_irqrestore(&spon_list_slock, flags); pon->is_spon = true; - } else { - boot_reason = ffs(pon_sts); } /* config whether store the hard reset reason */ |
