aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-12-21 20:57:03 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-24 11:10:22 -0500
commit8a47ca957a6bf86f81893edd9401b91c00be4848 (patch)
tree89813cf0430be7e35a5c528b8924de574d758efd /sound
parenta49f0d1ea3ec94fc7cf33a7c36a16343b74bd565 (diff)
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: Tejun Heo <tj@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8350.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index fb92fb47d636..ec0efc1443ba 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -283,18 +283,16 @@ static int pga_event(struct snd_soc_dapm_widget *w,
283 out->ramp = WM8350_RAMP_UP; 283 out->ramp = WM8350_RAMP_UP;
284 out->active = 1; 284 out->active = 1;
285 285
286 if (!delayed_work_pending(&codec->dapm.delayed_work)) 286 schedule_delayed_work(&codec->dapm.delayed_work,
287 schedule_delayed_work(&codec->dapm.delayed_work, 287 msecs_to_jiffies(1));
288 msecs_to_jiffies(1));
289 break; 288 break;
290 289
291 case SND_SOC_DAPM_PRE_PMD: 290 case SND_SOC_DAPM_PRE_PMD:
292 out->ramp = WM8350_RAMP_DOWN; 291 out->ramp = WM8350_RAMP_DOWN;
293 out->active = 0; 292 out->active = 0;
294 293
295 if (!delayed_work_pending(&codec->dapm.delayed_work)) 294 schedule_delayed_work(&codec->dapm.delayed_work,
296 schedule_delayed_work(&codec->dapm.delayed_work, 295 msecs_to_jiffies(1));
297 msecs_to_jiffies(1));
298 break; 296 break;
299 } 297 }
300 298