summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-tea5777.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-07-31 16:38:41 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-31 18:21:45 -0300
commit2f2da1e2995c9362babd7da3cc9d340be184ea73 (patch)
tree7de2853de1c74caedb991fc309376c735b5b46e4 /drivers/media/radio/radio-tea5777.c
parent24ed693da0cefede7382d498dd5e9a83f0a21c38 (diff)
downloadtalos-obmc-linux-2f2da1e2995c9362babd7da3cc9d340be184ea73.tar.gz
talos-obmc-linux-2f2da1e2995c9362babd7da3cc9d340be184ea73.zip
[media] radio-tea5777: use library for 64bits div
drivers/built-in.o: In function `radio_tea5777_set_freq': radio-tea5777.c:(.text+0x4d8704): undefined reference to `__udivdi3' Reported-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/radio-tea5777.c')
-rw-r--r--drivers/media/radio/radio-tea5777.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/radio/radio-tea5777.c b/drivers/media/radio/radio-tea5777.c
index 3e12179364f8..5bc9fa62720b 100644
--- a/drivers/media/radio/radio-tea5777.c
+++ b/drivers/media/radio/radio-tea5777.c
@@ -33,6 +33,7 @@
#include <media/v4l2-fh.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
+#include <asm/div64.h>
#include "radio-tea5777.h"
MODULE_AUTHOR("Hans de Goede <perex@perex.cz>");
@@ -158,10 +159,11 @@ static int radio_tea5777_set_freq(struct radio_tea5777 *tea)
int res;
freq = clamp_t(u32, tea->freq,
- TEA5777_FM_RANGELOW, TEA5777_FM_RANGEHIGH);
- freq = (freq + 8) / 16; /* to kHz */
+ TEA5777_FM_RANGELOW, TEA5777_FM_RANGEHIGH) + 8;
+ do_div(freq, 16); /* to kHz */
- freq = (freq - TEA5777_FM_IF) / TEA5777_FM_FREQ_STEP;
+ freq -= TEA5777_FM_IF;
+ do_div(freq, TEA5777_FM_FREQ_STEP);
tea->write_reg &= ~(TEA5777_W_FM_PLL_MASK | TEA5777_W_FM_FREF_MASK);
tea->write_reg |= freq << TEA5777_W_FM_PLL_SHIFT;
OpenPOWER on IntegriCloud