From b3f363e089e192743038d12d2d59ba8fa64b88b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Sun, 13 Apr 2014 00:18:11 +0200 Subject: [PATCH] Fix build on kernel 3.14. (preempt_enable_no_resched() has been made inaccessible to modules) --- nbsmi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nbsmi.c b/nbsmi.c index 8ce10b9..e97ec4c 100644 --- a/nbsmi.c +++ b/nbsmi.c @@ -121,7 +121,11 @@ static inline u32 ati_do_smi_call(u16 function) : "memory", "ebx", "ecx", "edx", "esi", "edi", "cc"); local_irq_restore(flags); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) + preempt_enable(); +#else preempt_enable_no_resched(); +#endif return retval; } @@ -170,7 +174,11 @@ static inline u32 intel_do_smi_call(u16 function, struct pci_dev *lpc_bridge) outl(state, sci_en); local_irq_restore(flags); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) + preempt_enable(); +#else preempt_enable_no_resched(); +#endif return retval; } -- 2.43.5