Skip to content

Commit

Permalink
ASoC: wm8350: Use jiffies rather than msecs in schedule_delayed_work()
Browse files Browse the repository at this point in the history
The delay parameter of schedule_delayed_work() is number of jiffies to wait
rather than miliseconds.

Before commit 6d3c26b "ASoC: Use delayed work to debounce WM8350 jack IRQs",
the debounce time is 200 miliseconds in wm8350_hp_jack_handler().
So I think this is a bug when convert to use delayed work.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 3, 2013
1 parent 19f949f commit 51cd02d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8350.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ static irqreturn_t wm8350_hpl_jack_handler(int irq, void *data)
if (device_may_wakeup(wm8350->dev))
pm_wakeup_event(wm8350->dev, 250);

schedule_delayed_work(&priv->hpl.work, 200);
schedule_delayed_work(&priv->hpl.work, msecs_to_jiffies(200));

return IRQ_HANDLED;
}
Expand All @@ -1320,7 +1320,7 @@ static irqreturn_t wm8350_hpr_jack_handler(int irq, void *data)
if (device_may_wakeup(wm8350->dev))
pm_wakeup_event(wm8350->dev, 250);

schedule_delayed_work(&priv->hpr.work, 200);
schedule_delayed_work(&priv->hpr.work, msecs_to_jiffies(200));

return IRQ_HANDLED;
}
Expand Down

0 comments on commit 51cd02d

Please sign in to comment.