Created
November 27, 2017 23:27
-
-
Save MilhouseVH/474d1f5f881d79e6ea6c5fa1e99ba8f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5e1cb0b78142bf7ed7d348f4a47c236590e72b57 Mon Sep 17 00:00:00 2001 | |
From: MilhouseVH <[email protected]> | |
Date: Mon, 27 Nov 2017 20:48:13 +0000 | |
Subject: [PATCH] kernel 4.15 fix | |
--- | |
kernel/nv.c | 10 ++++------ | |
1 file changed, 4 insertions(+), 6 deletions(-) | |
diff --git a/kernel/nv.c b/kernel/nv.c | |
index 829c4a7..7b659b7 100644 | |
--- a/kernel/nv.c | |
+++ b/kernel/nv.c | |
@@ -332,7 +332,7 @@ static irqreturn_t nvidia_isr (int, void *, struct pt_regs *); | |
#else | |
static irqreturn_t nvidia_isr (int, void *); | |
#endif | |
-static void nvidia_rc_timer (unsigned long); | |
+static void nvidia_rc_timer (struct timer_list *t); | |
static int nvidia_ctl_open (struct inode *, struct file *); | |
static int nvidia_ctl_close (struct inode *, struct file *); | |
@@ -1891,10 +1891,10 @@ nvidia_isr_bh( | |
static void | |
nvidia_rc_timer( | |
- unsigned long data | |
+ struct timer_list *t | |
) | |
{ | |
- nv_linux_state_t *nvl = (nv_linux_state_t *) data; | |
+ nv_linux_state_t *nvl = from_timer(nvl, t, rc_timer); | |
nv_state_t *nv = NV_STATE_PTR(nvl); | |
NV_CHECK_PCI_CONFIG_SPACE(nvl->timer_sp, nv, TRUE, TRUE, FALSE); | |
@@ -2404,9 +2404,7 @@ int NV_API_CALL nv_start_rc_timer( | |
return -1; | |
nv_printf(NV_DBG_INFO, "NVRM: initializing rc timer\n"); | |
- init_timer(&nvl->rc_timer); | |
- nvl->rc_timer.function = nvidia_rc_timer; | |
- nvl->rc_timer.data = (unsigned long) nvl; | |
+ timer_setup(&nvl->rc_timer, nvidia_rc_timer, 0); | |
nv->rc_timer_enabled = 1; | |
mod_timer(&nvl->rc_timer, jiffies + HZ); /* set our timeout for 1 second */ | |
nv_printf(NV_DBG_INFO, "NVRM: rc timer initialized\n"); | |
-- | |
2.14.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment