1 Index: linux-gpib-kernel/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
2 ===================================================================
3 --- linux-gpib-kernel/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c (revision 1864)
4 +++ linux-gpib-kernel/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c (revision 1865)
10 struct char_buf { /* used by one_char() routine */
14 struct file * f; /* the 'file' structure for the tty-usb line */
15 uint8_t eos; /* eos character */
16 short eos_flags; /* eos mode */
17 - struct timespec before ; /* time value for timings */
18 + struct timespec64 before ; /* time value for timings */
19 int timeout; /* current value for timeout */
23 * (unix time in sec and NANOsec)
26 -inline int usec_diff (struct timespec * a, struct timespec * b) {
27 +inline int usec_diff (struct timespec64 * a, struct timespec64 * b) {
28 return ((a->tv_sec - b->tv_sec)*1000000 +
29 (a->tv_nsec - b->tv_nsec)/1000);
33 static int one_char(gpib_board_t *board, struct char_buf * b) {
35 - struct timespec before, after;
36 + struct timespec64 before, after;
37 struct file *f = ((usb_gpib_private_t *)board->private_data)->f;
41 DIA_LOG ("-> %x\n", b->inbuf[b->last - b->nchar]);
42 return b->inbuf[b->last - b->nchar--];
44 - getnstimeofday (&before);
45 + ktime_get_real_ts64 (&before);
47 f->f_op->read (f, b->inbuf, INBUF_SIZE, &f->f_pos);
48 - getnstimeofday (&after);
49 + ktime_get_real_ts64 (&after);
51 DIA_LOG ("read %d bytes in %d usec\n",
52 b->nchar, usec_diff(&after, &before));
57 - struct timespec before, after;
58 + struct timespec64 before, after;
59 int read_count = MAX_READ_EXCESS;
60 usb_gpib_private_t * pd = (usb_gpib_private_t *)board->private_data;
66 - getnstimeofday (&before);
67 + ktime_get_real_ts64 (&before);
69 if (write_loop (pd->f, USB_GPIB_READ_1,
70 strlen(USB_GPIB_READ_1)) == -EIO) {
73 retval += pd->f->f_op->read (pd->f, inbuf+1, 1,
75 - getnstimeofday (&after);
76 + ktime_get_real_ts64 (&after);