Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c19049568117848a209185a61d18971e3a856bd8
Commit:     c19049568117848a209185a61d18971e3a856bd8
Parent:     cededbfcbc31230c1717a7ed27ff6cf82734e568
Author:     Dmitry Torokhov <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 2 03:29:48 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed Feb 21 13:34:18 2007 -0200

    V4L/DVB (5025): Cleanup: switch to using msecs_to_jiffies() on bttv
    
    PS.: Part of the changes at the original patch were removed due to the 
changes
    done at commit 52c14e794f6ce345343a6b8fc98ea4e0ba2dfce4
    
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/bt8xx/bttv-input.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/media/video/bt8xx/bttv-input.c 
b/drivers/media/video/bt8xx/bttv-input.c
index 825161b..6f74c80 100644
--- a/drivers/media/video/bt8xx/bttv-input.c
+++ b/drivers/media/video/bt8xx/bttv-input.c
@@ -87,11 +87,9 @@ static void bttv_input_timer(unsigned long data)
 {
        struct bttv *btv = (struct bttv*)data;
        struct card_ir *ir = btv->remote;
-       unsigned long timeout;
 
        ir_handle_key(btv);
-       timeout = jiffies + (ir->polling * HZ / 1000);
-       mod_timer(&ir->timer, timeout);
+       mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
 }
 
 /* ---------------------------------------------------------------*/
@@ -102,7 +100,7 @@ static int bttv_rc5_irq(struct bttv *btv)
        struct timeval tv;
        u32 gpio;
        u32 gap;
-       unsigned long current_jiffies, timeout;
+       unsigned long current_jiffies;
 
        /* read gpio port */
        gpio = bttv_gpio_read(&btv->c);
@@ -139,8 +137,8 @@ static int bttv_rc5_irq(struct bttv *btv)
                ir->base_time = tv;
                ir->last_bit = 0;
 
-               timeout = current_jiffies + (500 + 30 * HZ) / 1000;
-               mod_timer(&ir->timer_end, timeout);
+               mod_timer(&ir->timer_end,
+                         current_jiffies + msecs_to_jiffies(30));
        }
 
        /* toggle GPIO pin 4 to reset the irq */
@@ -154,9 +152,7 @@ static int bttv_rc5_irq(struct bttv *btv)
 static void bttv_ir_start(struct bttv *btv, struct card_ir *ir)
 {
        if (ir->polling) {
-               init_timer(&ir->timer);
-               ir->timer.function = bttv_input_timer;
-               ir->timer.data     = (unsigned long)btv;
+               setup_timer(&ir->timer, bttv_input_timer, (unsigned long)btv);
                ir->timer.expires  = jiffies + HZ;
                add_timer(&ir->timer);
        } else if (ir->rc5_gpio) {
-
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