OSDN Git Service

Merge "icnss: Set crash state for PDR"
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / soc / qcom / icnss.c
index 271c6bd..bf815cb 100644 (file)
@@ -2603,21 +2603,22 @@ static int icnss_service_notifier_notify(struct notifier_block *nb,
        if (event_data == NULL)
                return notifier_from_errno(-ENOMEM);
 
+       event_data->crashed = true;
+
        if (state == NULL) {
-               event_data->crashed = true;
                priv->stats.recovery.root_pd_crash++;
                goto event_post;
        }
 
        switch (*state) {
        case ROOT_PD_WDOG_BITE:
-               event_data->crashed = true;
                event_data->wdog_bite = true;
                priv->stats.recovery.root_pd_crash++;
                break;
        case ROOT_PD_SHUTDOWN:
                cause = ICNSS_ROOT_PD_SHUTDOWN;
                priv->stats.recovery.root_pd_shutdown++;
+               event_data->crashed = false;
                break;
        case USER_PD_STATE_CHANGE:
                if (test_bit(ICNSS_HOST_TRIGGERED_PDR, &priv->state)) {
@@ -2629,7 +2630,6 @@ static int icnss_service_notifier_notify(struct notifier_block *nb,
                }
                break;
        default:
-               event_data->crashed = true;
                priv->stats.recovery.root_pd_crash++;
                break;
        }