Commit d12c4247 authored by Alessandro Rubini's avatar Alessandro Rubini

compat: badly hack a div64 fix for 2.6.24

parent fbf2007c
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/math64.h> //#include <linux/math64.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include "fine-delay.h" #include "fine-delay.h"
#include "hw/fd_main_regs.h" #include "hw/fd_main_regs.h"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/math64.h> //#include <linux/math64.h>
#include "fine-delay.h" #include "fine-delay.h"
#include "hw/fd_main_regs.h" #include "hw/fd_main_regs.h"
#include "hw/acam_gpx.h" #include "hw/acam_gpx.h"
......
...@@ -99,7 +99,17 @@ enum fd_output_mode { ...@@ -99,7 +99,17 @@ enum fd_output_mode {
#ifdef __KERNEL__ /* All the rest is only of kernel users */ #ifdef __KERNEL__ /* All the rest is only of kernel users */
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
#include <linux/math64.h> #include <linux/math64.h>
#else
/* Hack to compile under 2.6.24: this comes from 2418f4f2 (Roman Zippel) */
static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
{
*remainder = do_div(dividend, divisor);
return dividend;
}
#endif
struct fd_calib { struct fd_calib {
int64_t frr_poly[3]; /* SY89295 delay/temp poly coeffs */ int64_t frr_poly[3]; /* SY89295 delay/temp poly coeffs */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment