media: Revert cleanup ktime_set() usage
authorJasmin Jessich <jasmin@anw.at>
Sat, 28 Apr 2018 07:45:51 +0000 (03:45 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 9 May 2018 20:31:06 +0000 (16:31 -0400)
This reverts 8b0e195314fa, because media-tree drivers should use the
API functions to initialize variables of type ktime_t.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jasmin Jessich <jasmin@anw.at>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/dvb-core/dmxdev.c
drivers/media/pci/cx88/cx88-input.c
drivers/media/pci/pt3/pt3.c

index 61a750fae4653be8da2ee47e60ae94e36e2143e6..cb078d688c708d6880d753fe88fcdebec9f62acc 100644 (file)
@@ -622,7 +622,7 @@ static int dvb_dmxdev_start_feed(struct dmxdev *dmxdev,
                                 struct dmxdev_filter *filter,
                                 struct dmxdev_feed *feed)
 {
-       ktime_t timeout = 0;
+       ktime_t timeout = ktime_set(0, 0);
        struct dmx_pes_filter_params *para = &filter->params.pes;
        enum dmx_output otype;
        int ret;
index 16233e837fcc3c891ce4e9bf5938ce4b45d65ef7..2f5debce4905fdf66f7fb1b7f395e3a7ca96fc60 100644 (file)
@@ -180,7 +180,8 @@ static enum hrtimer_restart cx88_ir_work(struct hrtimer *timer)
        struct cx88_IR *ir = container_of(timer, struct cx88_IR, timer);
 
        cx88_ir_handle_key(ir);
-       missed = hrtimer_forward_now(&ir->timer, ir->polling * 1000000LL);
+       missed = hrtimer_forward_now(&ir->timer,
+                                    ktime_set(0, ir->polling * 1000000));
        if (missed > 1)
                ir_dprintk("Missed ticks %ld\n", missed - 1);
 
@@ -200,7 +201,8 @@ static int __cx88_ir_start(void *priv)
        if (ir->polling) {
                hrtimer_init(&ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
                ir->timer.function = cx88_ir_work;
-               hrtimer_start(&ir->timer, ir->polling * 1000000LL,
+               hrtimer_start(&ir->timer,
+                             ktime_set(0, ir->polling * 1000000),
                              HRTIMER_MODE_REL);
        }
        if (ir->sampling) {
index dcefe854022ec62106738f5bd3fde594d1170c60..90273b4d772f809792cb28f4c3db582217d4af4c 100644 (file)
@@ -444,7 +444,7 @@ static int pt3_fetch_thread(void *data)
 
                pt3_proc_dma(adap);
 
-               delay = PT3_FETCH_DELAY * NSEC_PER_MSEC;
+               delay = ktime_set(0, PT3_FETCH_DELAY * NSEC_PER_MSEC);
                set_current_state(TASK_UNINTERRUPTIBLE);
                freezable_schedule_hrtimeout_range(&delay,
                                        PT3_FETCH_DELAY_DELTA * NSEC_PER_MSEC,