]> git.pld-linux.org Git - packages/linux-gpib.git/blob - kernel-5.6.patch
ef9134956e90b7b37918fb271e5932b049bda95a
[packages/linux-gpib.git] / kernel-5.6.patch
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)
5 @@ -100,6 +100,7 @@
6  
7  #define INBUF_SIZE 128
8  
9 +
10  struct char_buf {               /* used by one_char() routine */
11         char * inbuf;
12         int last;
13 @@ -110,7 +111,7 @@
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 */
20  } usb_gpib_private_t;
21  
22 @@ -188,7 +189,7 @@
23   *               (unix time in sec and NANOsec)
24   */
25  
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);
30  }
31 @@ -302,7 +303,7 @@
32  
33  static int one_char(gpib_board_t *board, struct char_buf * b) {
34  
35 -       struct timespec before, after;
36 +       struct timespec64 before, after;
37         struct file *f = ((usb_gpib_private_t *)board->private_data)->f;
38  
39         if (b->nchar) {
40 @@ -309,10 +310,10 @@
41                 DIA_LOG ("-> %x\n", b->inbuf[b->last - b->nchar]);
42                 return b->inbuf[b->last - b->nchar--];
43         }
44 -       getnstimeofday (&before);
45 +       ktime_get_real_ts64 (&before);
46         b->last = b->nchar =
47                 f->f_op->read (f, b->inbuf, INBUF_SIZE, &f->f_pos);
48 -       getnstimeofday (&after);
49 +       ktime_get_real_ts64 (&after);
50  
51         DIA_LOG ("read %d bytes in %d usec\n",
52                 b->nchar, usec_diff(&after, &before));
53 @@ -721,7 +722,7 @@
54         int retval;
55         mm_segment_t oldfs;
56         char c;
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;
61  
62 @@ -743,7 +744,7 @@
63                 oldfs = get_fs();
64                 set_fs (KERNEL_DS);
65  
66 -               getnstimeofday (&before);
67 +               ktime_get_real_ts64 (&before);
68  
69                 if (write_loop (pd->f, USB_GPIB_READ_1,
70                                 strlen(USB_GPIB_READ_1)) == -EIO) {
71 @@ -755,7 +756,7 @@
72                                         &pd->f->f_pos);
73                 retval += pd->f->f_op->read (pd->f, inbuf+1, 1,
74                                         &pd->f->f_pos);
75 -               getnstimeofday (&after);
76 +               ktime_get_real_ts64 (&after);
77  
78                 set_fs (oldfs);
79  
This page took 0.049865 seconds and 2 git commands to generate.