All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFT] ASoC: wm8350: Use jiffies rather than msecs in schedule_delayed_work()
@ 2013-03-03  8:20 Axel Lin
  2013-03-03 14:47 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-03-03  8:20 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, patches, Liam Girdwood

The delay parameter of schedule_delayed_work() is number of jiffies to wait
rather than miliseconds.

Before commit 6d3c26bcb "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>
---
 sound/soc/codecs/wm8350.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index ec0efc1..0e8b3aa 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -1301,7 +1301,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;
 }
@@ -1318,7 +1318,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;
 }
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RFT] ASoC: wm8350: Use jiffies rather than msecs in schedule_delayed_work()
  2013-03-03  8:20 [PATCH RFT] ASoC: wm8350: Use jiffies rather than msecs in schedule_delayed_work() Axel Lin
@ 2013-03-03 14:47 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-03-03 14:47 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, patches, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 181 bytes --]

On Sun, Mar 03, 2013 at 04:20:50PM +0800, Axel Lin wrote:
> The delay parameter of schedule_delayed_work() is number of jiffies to wait
> rather than miliseconds.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-03 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-03  8:20 [PATCH RFT] ASoC: wm8350: Use jiffies rather than msecs in schedule_delayed_work() Axel Lin
2013-03-03 14:47 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.