Commit bc962efa authored by Rene Herman's avatar Rene Herman Committed by Jaroslav Kysela

[ALSA] ad1848: replace HZ calculus with msecs_to_jiffies()

If I'm not mistaken, any (new) use of HZ these days is considered a bug so
while I'm there...
Signed-off-by: default avatarRene Herman <rene.herman@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 90cf9b85
...@@ -239,7 +239,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip) ...@@ -239,7 +239,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
#if 0 #if 0
printk("(2) jiffies = %li\n", jiffies); printk("(2) jiffies = %li\n", jiffies);
#endif #endif
time = HZ / 4; time = msecs_to_jiffies(250);
while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) { while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) {
spin_unlock_irqrestore(&chip->reg_lock, flags); spin_unlock_irqrestore(&chip->reg_lock, flags);
if (time <= 0) { if (time <= 0) {
...@@ -252,7 +252,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip) ...@@ -252,7 +252,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
#if 0 #if 0
printk("(3) jiffies = %li\n", jiffies); printk("(3) jiffies = %li\n", jiffies);
#endif #endif
time = HZ / 10; time = msecs_to_jiffies(100);
while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) { while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) {
spin_unlock_irqrestore(&chip->reg_lock, flags); spin_unlock_irqrestore(&chip->reg_lock, flags);
if (time <= 0) { if (time <= 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment