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

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

Merge "power: qpnp-fg-gen3: Fix FG cleanup operation"

parents 294c35b1 2582140f
Loading
Loading
Loading
Loading
+12 −1
Original line number Original line Diff line number Diff line
@@ -5604,13 +5604,24 @@ static void fg_cleanup(struct fg_chip *chip)
{
{
	int i;
	int i;


	power_supply_unreg_notifier(&chip->nb);
	qpnp_misc_twm_notifier_unregister(&chip->twm_nb);
	cancel_delayed_work_sync(&chip->ttf_work);
	cancel_delayed_work_sync(&chip->sram_dump_work);
	if (chip->dt.use_esr_sw)
		alarm_cancel(&chip->esr_sw_timer);
	cancel_work_sync(&chip->esr_sw_work);
	cancel_delayed_work_sync(&chip->profile_load_work);
	cancel_work_sync(&chip->status_change_work);
	cancel_work_sync(&chip->esr_filter_work);
	cancel_delayed_work_sync(&chip->pl_enable_work);

	for (i = 0; i < FG_IRQ_MAX; i++) {
	for (i = 0; i < FG_IRQ_MAX; i++) {
		if (fg_irqs[i].irq)
		if (fg_irqs[i].irq)
			devm_free_irq(chip->dev, fg_irqs[i].irq, chip);
			devm_free_irq(chip->dev, fg_irqs[i].irq, chip);
	}
	}


	alarm_try_to_cancel(&chip->esr_filter_alarm);
	alarm_try_to_cancel(&chip->esr_filter_alarm);
	power_supply_unreg_notifier(&chip->nb);
	debugfs_remove_recursive(chip->dfs_root);
	debugfs_remove_recursive(chip->dfs_root);
	if (chip->awake_votable)
	if (chip->awake_votable)
		destroy_votable(chip->awake_votable);
		destroy_votable(chip->awake_votable);