提交 8a47ca95 编写于 作者: T Tejun Heo 提交者: Mark Brown

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: NTejun Heo <tj@kernel.org>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 a49f0d1e
......@@ -283,18 +283,16 @@ 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));
schedule_delayed_work(&codec->dapm.delayed_work,
msecs_to_jiffies(1));
break;
case SND_SOC_DAPM_PRE_PMD:
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));
schedule_delayed_work(&codec->dapm.delayed_work,
msecs_to_jiffies(1));
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册