* [PATCH] ad1848: replace HZ calculus with msecs_to_jiffies()
@ 2007-09-10 18:43 Rene Herman
0 siblings, 0 replies; only message in thread
From: Rene Herman @ 2007-09-10 18:43 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Krzysztof Helt, ALSA devel
[-- Attachment #1: Type: text/plain, Size: 167 bytes --]
Hi Takashi.
If I'm not mistaken, any (new) use of HZ these days is considered a bug so
while I'm there...
Signed-off-by: Rene Herman <rene.herman@gmail.com>
Rene.
[-- Attachment #2: ad1848_msecs_to_jiffies.diff --]
[-- Type: text/plain, Size: 816 bytes --]
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
index dcd4435..161da11 100644
--- a/sound/isa/ad1848/ad1848_lib.c
+++ b/sound/isa/ad1848/ad1848_lib.c
@@ -237,7 +237,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
#if 0
printk("(2) jiffies = %li\n", jiffies);
#endif
- time = HZ / 4;
+ time = msecs_to_jiffies(250);
while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) {
spin_unlock_irqrestore(&chip->reg_lock, flags);
if (time <= 0) {
@@ -250,7 +250,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
#if 0
printk("(3) jiffies = %li\n", jiffies);
#endif
- time = HZ / 10;
+ time = msecs_to_jiffies(100);
while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) {
spin_unlock_irqrestore(&chip->reg_lock, flags);
if (time <= 0) {
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-09-10 18:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-10 18:43 [PATCH] ad1848: replace HZ calculus with msecs_to_jiffies() Rene Herman
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.