]> git.pld-linux.org Git - packages/linux-gpib.git/commitdiff
- fix building kernel module for linux 5.6 auto/th/linux-gpib-4.3.0-6
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 6 Apr 2020 21:13:52 +0000 (23:13 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 6 Apr 2020 21:13:52 +0000 (23:13 +0200)
- rel 6

kernel-5.6.patch [new file with mode: 0644]
linux-gpib.spec

diff --git a/kernel-5.6.patch b/kernel-5.6.patch
new file mode 100644 (file)
index 0000000..ef91349
--- /dev/null
@@ -0,0 +1,79 @@
+Index: linux-gpib-kernel/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+===================================================================
+--- linux-gpib-kernel/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c       (revision 1864)
++++ linux-gpib-kernel/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c       (revision 1865)
+@@ -100,6 +100,7 @@
+ #define INBUF_SIZE 128
++
+ struct char_buf {               /* used by one_char() routine */
+       char * inbuf;
+       int last;
+@@ -110,7 +111,7 @@
+       struct file * f;        /* the 'file' structure for the tty-usb line */
+       uint8_t eos;            /* eos character */
+       short eos_flags;        /* eos mode */
+-      struct timespec before  ;  /* time value for timings */
++      struct timespec64 before  ;  /* time value for timings */
+         int timeout;            /* current value for timeout */
+ } usb_gpib_private_t;
+@@ -188,7 +189,7 @@
+  *               (unix time in sec and NANOsec)
+  */
+-inline int usec_diff (struct timespec * a, struct timespec * b) {
++inline int usec_diff (struct timespec64 * a, struct timespec64 * b) {
+       return ((a->tv_sec - b->tv_sec)*1000000 +
+               (a->tv_nsec - b->tv_nsec)/1000);
+ }
+@@ -302,7 +303,7 @@
+ static int one_char(gpib_board_t *board, struct char_buf * b) {
+-      struct timespec before, after;
++      struct timespec64 before, after;
+       struct file *f = ((usb_gpib_private_t *)board->private_data)->f;
+       if (b->nchar) {
+@@ -309,10 +310,10 @@
+               DIA_LOG ("-> %x\n", b->inbuf[b->last - b->nchar]);
+               return b->inbuf[b->last - b->nchar--];
+       }
+-      getnstimeofday (&before);
++      ktime_get_real_ts64 (&before);
+       b->last = b->nchar =
+               f->f_op->read (f, b->inbuf, INBUF_SIZE, &f->f_pos);
+-      getnstimeofday (&after);
++      ktime_get_real_ts64 (&after);
+       DIA_LOG ("read %d bytes in %d usec\n",
+               b->nchar, usec_diff(&after, &before));
+@@ -721,7 +722,7 @@
+       int retval;
+       mm_segment_t oldfs;
+       char c;
+-      struct timespec before, after;
++      struct timespec64 before, after;
+       int read_count = MAX_READ_EXCESS;
+       usb_gpib_private_t * pd = (usb_gpib_private_t *)board->private_data;
+@@ -743,7 +744,7 @@
+               oldfs = get_fs();
+               set_fs (KERNEL_DS);
+-              getnstimeofday (&before);
++              ktime_get_real_ts64 (&before);
+               if (write_loop (pd->f, USB_GPIB_READ_1,
+                               strlen(USB_GPIB_READ_1)) == -EIO) {
+@@ -755,7 +756,7 @@
+                                       &pd->f->f_pos);
+               retval += pd->f->f_op->read (pd->f, inbuf+1, 1,
+                                       &pd->f->f_pos);
+-              getnstimeofday (&after);
++              ktime_get_real_ts64 (&after);
+               set_fs (oldfs);
index 4bd01746e66df06b91fbd6b572dd220151fa8a66..0e4073e31eaa0c9398f74f015eddee108a941155 100644 (file)
@@ -32,7 +32,7 @@ exit 1
 
 %define                php_name        php%{?php_suffix}
 
-%define                rel     5
+%define                rel     6
 %define                pname   linux-gpib
 Summary:       GPIB (IEEE 488) Linux support
 Summary(pl.UTF-8):     Obsługa GPIB (IEEE 488) dla Linuksa
@@ -49,6 +49,7 @@ Patch4:               %{pname}-firmwaredir.patch
 Patch5:                %{pname}-guile2.patch
 Patch6:                %{pname}-php7.patch
 Patch8:                kernel-5.2.patch
+Patch9:                kernel-5.6.patch
 URL:           http://linux-gpib.sourceforge.net/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
@@ -270,6 +271,7 @@ cd linux-gpib-kernel-%{version}
 %ifarch %{ix86}
 %patch8 -p1
 %endif
+%patch9 -p1
 %endif
 
 %build
This page took 0.086969 seconds and 4 git commands to generate.