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

Commit 9a393415 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5-lib: Cancel alarm_timer conditionally"

parents a3498768 be36fb36
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -773,6 +773,8 @@ static void smblib_uusb_removal(struct smb_charger *chg)
	struct storm_watch *wdata;

	cancel_delayed_work_sync(&chg->pl_enable_work);

	if (chg->wa_flags & CHG_TERMINATION_WA)
		alarm_cancel(&chg->chg_termination_alarm);

	if (chg->wa_flags & BOOST_BACK_WA) {
@@ -3522,6 +3524,8 @@ static void typec_src_removal(struct smb_charger *chg)
	}

	cancel_delayed_work_sync(&chg->pl_enable_work);

	if (chg->wa_flags & CHG_TERMINATION_WA)
		alarm_cancel(&chg->chg_termination_alarm);

	/* reset input current limit voters */
@@ -4531,11 +4535,13 @@ int smblib_deinit(struct smb_charger *chg)
			alarm_cancel(&chg->moisture_protection_alarm);
			cancel_work_sync(&chg->moisture_protection_work);
		}
		if (chg->wa_flags & CHG_TERMINATION_WA) {
			alarm_cancel(&chg->chg_termination_alarm);
			cancel_work_sync(&chg->chg_termination_work);
		}
		cancel_work_sync(&chg->bms_update_work);
		cancel_work_sync(&chg->jeita_update_work);
		cancel_work_sync(&chg->pl_update_work);
		cancel_work_sync(&chg->chg_termination_work);
		cancel_delayed_work_sync(&chg->clear_hdc_work);
		cancel_delayed_work_sync(&chg->icl_change_work);
		cancel_delayed_work_sync(&chg->pl_enable_work);