]> err.no Git - linux-2.6/commitdiff
V4L/DVB (5857): Use msecs_to_jiffies instead of HZ on radio drivers
authorMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 17 Jul 2007 19:15:58 +0000 (16:15 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 20 Jul 2007 20:35:47 +0000 (17:35 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/radio/radio-aimslab.c
drivers/media/radio/radio-cadet.c

index ce940b1b787f346d442d58fedd978aaf07249bfa..f0a67e93d7fd0765a38baece496b3eadc18b2b3a 100644 (file)
@@ -63,7 +63,7 @@ struct rt_device
 static void sleep_delay(long n)
 {
        /* Sleep nicely for 'n' uS */
-       int d=n/(1000000/HZ);
+       int d=n/msecs_to_jiffies(1000);
        if(!d)
                udelay(n);
        else
index 8cf2e9df5c8aa0ae5365d2293b1e53c9c417669e..34e317ced5a346243de25cf65e62577cbd6181bc 100644 (file)
@@ -329,7 +329,7 @@ cadet_handler(unsigned long data)
        init_timer(&readtimer);
        readtimer.function=cadet_handler;
        readtimer.data=(unsigned long)0;
-       readtimer.expires=jiffies+(HZ/20);
+       readtimer.expires=jiffies+msecs_to_jiffies(50);
        add_timer(&readtimer);
 }
 
@@ -349,7 +349,7 @@ cadet_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
                init_timer(&readtimer);
                readtimer.function=cadet_handler;
                readtimer.data=(unsigned long)0;
-               readtimer.expires=jiffies+(HZ/20);
+               readtimer.expires=jiffies+msecs_to_jiffies(50);
                add_timer(&readtimer);
        }
        if(rdsin==rdsout) {