Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=45cffef1ff4679f5961146101ea1b8235bdd25b5
Commit:     45cffef1ff4679f5961146101ea1b8235bdd25b5
Parent:     9b0d39be53b057e05e2f796a071ff1cead3a2506
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 10 16:50:37 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 15:58:40 2007 +0200

    [ALSA] Use msecs_to_jiffies() in ac97_codec.c
    
    Replace the direct calculation of jiffies with msecs_to_jiffies().
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/ac97/ac97_codec.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 7b02a96..df13333 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -2036,11 +2036,12 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct 
snd_ac97_template *template,
        else {
                udelay(50);
                if (ac97->scaps & AC97_SCAP_SKIP_AUDIO)
-                       err = ac97_reset_wait(ac97, HZ/2, 1);
+                       err = ac97_reset_wait(ac97, msecs_to_jiffies(500), 1);
                else {
-                       err = ac97_reset_wait(ac97, HZ/2, 0);
+                       err = ac97_reset_wait(ac97, msecs_to_jiffies(500), 0);
                        if (err < 0)
-                               err = ac97_reset_wait(ac97, HZ/2, 1);
+                               err = ac97_reset_wait(ac97,
+                                                     msecs_to_jiffies(500), 1);
                }
                if (err < 0) {
                        snd_printk(KERN_WARNING "AC'97 %d does not respond - 
RESET\n", ac97->num);
@@ -2104,7 +2105,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct 
snd_ac97_template *template,
                }
                /* nothing should be in powerdown mode */
                snd_ac97_write_cache(ac97, AC97_GENERAL_PURPOSE, 0);
-               end_time = jiffies + (HZ / 10);
+               end_time = jiffies + msecs_to_jiffies(100);
                do {
                        if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 
0x0f)
                                goto __ready_ok;
@@ -2136,7 +2137,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct 
snd_ac97_template *template,
                udelay(100);
                /* nothing should be in powerdown mode */
                snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0);
-               end_time = jiffies + (HZ / 10);
+               end_time = jiffies + msecs_to_jiffies(100);
                do {
                        if ((snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS) & tmp) 
== tmp)
                                goto __ready_ok;
@@ -2354,7 +2355,8 @@ int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, 
int powerup)
                 * (for avoiding loud click noises for many (OSS) apps
                 *  that open/close frequently)
                 */
-               schedule_delayed_work(&ac97->power_work, HZ*2);
+               schedule_delayed_work(&ac97->power_work,
+                                     msecs_to_jiffies(2000));
        else {
                cancel_delayed_work(&ac97->power_work);
                update_power_regs(ac97);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to