Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3dde915 authored by Mohammed Siddiq's avatar Mohammed Siddiq
Browse files

icnss: Change to skip driver remove if shutdown blocked



In idle-restart event handler, shutdown is blocked before
driver op idle_restart is called and the icnss driver state
is updated to ICNSS_BLOCK_SHUTDOWN. On receiving modem
notifier, the driver remove needs to be skipped if shutdown
is already blocked.

Change-Id: I9753eb578374879856e2a5ab7a79f5ea219d0218
Signed-off-by: default avatarMohammed Siddiq <msiddiq@codeaurora.org>
parent f8b00cea
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt) "icnss: " fmt
@@ -1398,7 +1398,8 @@ static void icnss_update_state_send_modem_shutdown(struct icnss_priv *priv,
		if (atomic_read(&priv->is_shutdown)) {
			atomic_set(&priv->is_shutdown, false);
			if (!test_bit(ICNSS_PD_RESTART, &priv->state) &&
				!test_bit(ICNSS_SHUTDOWN_DONE, &priv->state)) {
				!test_bit(ICNSS_SHUTDOWN_DONE, &priv->state) &&
				!test_bit(ICNSS_BLOCK_SHUTDOWN, &priv->state)) {
				icnss_call_driver_remove(priv);
			}
		}