From: Rene Herman <rene.herman@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Krzysztof Helt <krzysztof.h1@gmail.com>,
ALSA devel <alsa-devel@alsa-project.org>
Subject: [PATCH] ad1848: replace HZ calculus with msecs_to_jiffies()
Date: Mon, 10 Sep 2007 20:43:12 +0200 [thread overview]
Message-ID: <46E59040.8090707@gmail.com> (raw)
[-- 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
reply other threads:[~2007-09-10 18:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46E59040.8090707@gmail.com \
--to=rene.herman@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=krzysztof.h1@gmail.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox