summarylogtreecommitdiffstats
path: root/0001-Kernel-4-15-timers.patch
diff options
context:
space:
mode:
authorChris Severance2018-06-19 14:54:19 -0400
committerChris Severance2018-06-19 14:54:19 -0400
commit9320fc321abd47d70ec7b0cb1cc3b0edbbfa415c (patch)
tree3905853375c24ea14969934ddfd5e694828e2517 /0001-Kernel-4-15-timers.patch
downloadaur-9320fc321abd47d70ec7b0cb1cc3b0edbbfa415c.tar.gz
Initial Import
Diffstat (limited to '0001-Kernel-4-15-timers.patch')
-rw-r--r--0001-Kernel-4-15-timers.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/0001-Kernel-4-15-timers.patch b/0001-Kernel-4-15-timers.patch
new file mode 100644
index 000000000000..67f8b39178ed
--- /dev/null
+++ b/0001-Kernel-4-15-timers.patch
@@ -0,0 +1,87 @@
+diff -pNaru5 dgnc-1.3.orig-0001/driver/2.6.27/dgnc_driver.c dgnc-1.3/driver/2.6.27/dgnc_driver.c
+--- dgnc-1.3.orig-0001/driver/2.6.27/dgnc_driver.c 2017-10-21 10:39:21.000000000 -0400
++++ dgnc-1.3/driver/2.6.27/dgnc_driver.c 2018-06-17 15:58:18.724092247 -0400
+@@ -77,11 +77,15 @@ PARM_INT(trcbuf_size, 0x100000, 0644, "
+ static int dgnc_start(void);
+ static int dgnc_finalize_board_init(struct board_t *brd);
+ static void dgnc_init_globals(void);
+ static int dgnc_found_board(struct pci_dev *pdev, int id);
+ static void dgnc_cleanup_board(struct board_t *brd);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
+ static void dgnc_poll_handler(ulong dummy);
++#else
++static void dgnc_poll_handler(struct timer_list *dummy);
++#endif
+ static int dgnc_init_pci(void);
+ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
+ static void dgnc_remove_one(struct pci_dev *dev);
+ static int dgnc_probe1(struct pci_dev *pdev, int card_type);
+ static void dgnc_do_remap(struct board_t *brd);
+@@ -330,13 +334,17 @@ static int dgnc_start(void)
+ return(rc);
+ }
+
+ /* Start the poller */
+ DGNC_LOCK(dgnc_poll_lock, flags);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
+ init_timer(&dgnc_poll_timer);
+ dgnc_poll_timer.function = dgnc_poll_handler;
+ dgnc_poll_timer.data = 0;
++#else
++ timer_setup(&dgnc_poll_timer,dgnc_poll_handler,0);
++#endif
+ dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick);
+ dgnc_poll_timer.expires = dgnc_poll_time;
+ DGNC_UNLOCK(dgnc_poll_lock, flags);
+
+ add_timer(&dgnc_poll_timer);
+@@ -862,11 +870,15 @@ static void dgnc_do_remap(struct board_t
+ * waiter needs to be woken up, and (b) whether the poller needs to
+ * be rescheduled.
+ *
+ ******************************************************************************/
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
+ static void dgnc_poll_handler(ulong dummy)
++#else
++static void dgnc_poll_handler(struct timer_list *dummy)
++#endif
+ {
+ struct board_t *brd;
+ unsigned long lock_flags;
+ int i;
+ unsigned long new_time;
+@@ -912,13 +924,17 @@ schedule_poller:
+
+ if ((ulong) new_time >= 2 * dgnc_poll_tick) {
+ dgnc_poll_time = jiffies + dgnc_jiffies_from_ms(dgnc_poll_tick);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
+ init_timer(&dgnc_poll_timer);
+ dgnc_poll_timer.function = dgnc_poll_handler;
+ dgnc_poll_timer.data = 0;
++#else
++ timer_setup(&dgnc_poll_timer,dgnc_poll_handler,0);
++#endif
+ dgnc_poll_timer.expires = dgnc_poll_time;
+ DGNC_UNLOCK(dgnc_poll_lock, lock_flags);
+
+ if (!dgnc_poll_stop)
+ add_timer(&dgnc_poll_timer);
+@@ -941,11 +957,15 @@ static void dgnc_init_globals(void)
+
+ for (i = 0; i < MAXBOARDS; i++) {
+ dgnc_Board[i] = NULL;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
+ init_timer(&dgnc_poll_timer);
++#else
++ timer_setup(&dgnc_poll_timer,NULL,0);
++#endif
+ }
+
+
+ /************************************************************************
+ *