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

Commit 356cf47c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: battery: Initialize work struct before cancelling work"

parents 2d65d278 463b3789
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1959,6 +1959,11 @@ int qcom_batt_init(struct charger_param *chg_param)
	if (!chip->pl_ws)
		goto cleanup;

	INIT_DELAYED_WORK(&chip->status_change_work, status_change_work);
	INIT_WORK(&chip->pl_taper_work, pl_taper_work);
	INIT_WORK(&chip->pl_disable_forever_work, pl_disable_forever_work);
	INIT_DELAYED_WORK(&chip->fcc_stepper_work, fcc_stepper_work);

	chip->fcc_main_votable = create_votable("FCC_MAIN", VOTE_MIN,
					pl_fcc_main_vote_callback,
					chip);
@@ -2028,11 +2033,6 @@ int qcom_batt_init(struct charger_param *chg_param)

	vote(chip->pl_disable_votable, PL_INDIRECT_VOTER, true, 0);

	INIT_DELAYED_WORK(&chip->status_change_work, status_change_work);
	INIT_WORK(&chip->pl_taper_work, pl_taper_work);
	INIT_WORK(&chip->pl_disable_forever_work, pl_disable_forever_work);
	INIT_DELAYED_WORK(&chip->fcc_stepper_work, fcc_stepper_work);

	rc = pl_register_notifier(chip);
	if (rc < 0) {
		pr_err("Couldn't register psy notifier rc = %d\n", rc);