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

Commit 8a47ca95 authored by Tejun Heo's avatar Tejun Heo Committed by Mark Brown
Browse files

ASoC: wm8350: don't use [delayed_]work_pending()



There's no need to test whether a (delayed) work item in pending
before queueing, flushing or cancelling it.  Most uses are unnecessary
and quite a few of them are buggy.

Remove unnecessary pending tests from wm8350.  Only compile tested.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a49f0d1e
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -283,7 +283,6 @@ static int pga_event(struct snd_soc_dapm_widget *w,
		out->ramp = WM8350_RAMP_UP;
		out->active = 1;

		if (!delayed_work_pending(&codec->dapm.delayed_work))
		schedule_delayed_work(&codec->dapm.delayed_work,
				      msecs_to_jiffies(1));
		break;
@@ -292,7 +291,6 @@ static int pga_event(struct snd_soc_dapm_widget *w,
		out->ramp = WM8350_RAMP_DOWN;
		out->active = 0;

		if (!delayed_work_pending(&codec->dapm.delayed_work))
		schedule_delayed_work(&codec->dapm.delayed_work,
				      msecs_to_jiffies(1));
		break;