diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-05 11:02:47 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-05 11:06:11 -0200 |
commit | 3308e2b53a6737d28782c89e6d2dd80237fde3e3 (patch) | |
tree | 4a739d146499cb4245439d73a78d1e287f8bdc7c /drivers/media/video/cx25840 | |
parent | 51ada787b89828314f09cb6b2f401c209db88917 (diff) | |
download | lwn-3308e2b53a6737d28782c89e6d2dd80237fde3e3.tar.gz lwn-3308e2b53a6737d28782c89e6d2dd80237fde3e3.zip |
[media] cx25840: Fix compilation for i386 architecture
WARNING: "__udivdi3" [/home/v4l/new_build/v4l/cx25840.ko] undefined!
64 bits division need to call do_div & friends, in order to allow
it to compile with 32 bits kernels
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx25840')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 4f43f4a7e72d..ad299668c374 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -43,6 +43,7 @@ #include <linux/videodev2.h> #include <linux/i2c.h> #include <linux/delay.h> +#include <linux/math64.h> #include <media/v4l2-common.h> #include <media/v4l2-chip-ident.h> #include <media/cx25840.h> @@ -2022,7 +2023,7 @@ void cx23885_dif_setup(struct i2c_client *client, u32 ifHz) /* Assuming TV */ /* Calculate the PLL frequency word based on the adjusted ifHz */ - pll_freq = ((u64)ifHz * 268435456) / 50000000; + pll_freq = div_u64((u64)ifHz * 268435456, 50000000); pll_freq_word = (u32)pll_freq; cx25840_write4(client, DIF_PLL_FREQ_WORD, pll_freq_word); |