diff options
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 222af479150b..415949526eec 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | #include <asm/page.h> | 36 | #include <asm/page.h> |
37 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
38 | #include <linux/jiffies.h> | 38 | #include <linux/ktime.h> |
39 | #include <media/v4l2-ioctl.h> | 39 | #include <media/v4l2-ioctl.h> |
40 | 40 | ||
41 | #include "gspca.h" | 41 | #include "gspca.h" |
@@ -442,8 +442,7 @@ void gspca_frame_add(struct gspca_dev *gspca_dev, | |||
442 | * is not queued, discard the whole frame */ | 442 | * is not queued, discard the whole frame */ |
443 | if (packet_type == FIRST_PACKET) { | 443 | if (packet_type == FIRST_PACKET) { |
444 | frame->data_end = frame->data; | 444 | frame->data_end = frame->data; |
445 | jiffies_to_timeval(get_jiffies_64(), | 445 | frame->v4l2_buf.timestamp = ktime_to_timeval(ktime_get()); |
446 | &frame->v4l2_buf.timestamp); | ||
447 | frame->v4l2_buf.sequence = ++gspca_dev->sequence; | 446 | frame->v4l2_buf.sequence = ++gspca_dev->sequence; |
448 | } else if (gspca_dev->last_packet_type == DISCARD_PACKET) { | 447 | } else if (gspca_dev->last_packet_type == DISCARD_PACKET) { |
449 | if (packet_type == LAST_PACKET) | 448 | if (packet_type == LAST_PACKET) |
@@ -2124,7 +2123,7 @@ static ssize_t dev_read(struct file *file, char __user *data, | |||
2124 | } | 2123 | } |
2125 | 2124 | ||
2126 | /* get a frame */ | 2125 | /* get a frame */ |
2127 | jiffies_to_timeval(get_jiffies_64(), ×tamp); | 2126 | timestamp = ktime_to_timeval(ktime_get()); |
2128 | timestamp.tv_sec--; | 2127 | timestamp.tv_sec--; |
2129 | n = 2; | 2128 | n = 2; |
2130 | for (;;) { | 2129 | for (;;) { |