]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
Fix build on kernel 3.14. (preempt_enable_no_resched() has been made
authorMichal Malý <madcatxster@devoid-pointer.net>
Sat, 12 Apr 2014 22:18:11 +0000 (00:18 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sat, 12 Apr 2014 22:18:11 +0000 (00:18 +0200)
inaccessible to modules)

nbsmi.c

diff --git a/nbsmi.c b/nbsmi.c
index 8ce10b98015e38acc04e079a81d2d6e9c35d3f5b..e97ec4c6c16798de8d1c9858bcf8ef09e45beab5 100644 (file)
--- 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;
 }