diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-31 15:38:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-31 17:24:44 -0400 |
commit | adfe1560de1c696324554fba70c92f2d7c947ff7 (patch) | |
tree | 71de0dbe9d0861e7abef3b2d654d751727b8bedc /drivers/media | |
parent | 4d98015eef6fa97b0cbba7310041ab75b223524b (diff) |
[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')
-rw-r--r-- | drivers/media/radio/radio-tea5777.c | 8 |
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 @@ | |||
33 | #include <media/v4l2-fh.h> | 33 | #include <media/v4l2-fh.h> |
34 | #include <media/v4l2-ioctl.h> | 34 | #include <media/v4l2-ioctl.h> |
35 | #include <media/v4l2-event.h> | 35 | #include <media/v4l2-event.h> |
36 | #include <asm/div64.h> | ||
36 | #include "radio-tea5777.h" | 37 | #include "radio-tea5777.h" |
37 | 38 | ||
38 | MODULE_AUTHOR("Hans de Goede <perex@perex.cz>"); | 39 | MODULE_AUTHOR("Hans de Goede <perex@perex.cz>"); |
@@ -158,10 +159,11 @@ static int radio_tea5777_set_freq(struct radio_tea5777 *tea) | |||
158 | int res; | 159 | int res; |
159 | 160 | ||
160 | freq = clamp_t(u32, tea->freq, | 161 | freq = clamp_t(u32, tea->freq, |
161 | TEA5777_FM_RANGELOW, TEA5777_FM_RANGEHIGH); | 162 | TEA5777_FM_RANGELOW, TEA5777_FM_RANGEHIGH) + 8; |
162 | freq = (freq + 8) / 16; /* to kHz */ | 163 | do_div(freq, 16); /* to kHz */ |
163 | 164 | ||
164 | freq = (freq - TEA5777_FM_IF) / TEA5777_FM_FREQ_STEP; | 165 | freq -= TEA5777_FM_IF; |
166 | do_div(freq, TEA5777_FM_FREQ_STEP); | ||
165 | 167 | ||
166 | tea->write_reg &= ~(TEA5777_W_FM_PLL_MASK | TEA5777_W_FM_FREF_MASK); | 168 | tea->write_reg &= ~(TEA5777_W_FM_PLL_MASK | TEA5777_W_FM_FREF_MASK); |
167 | tea->write_reg |= freq << TEA5777_W_FM_PLL_SHIFT; | 169 | tea->write_reg |= freq << TEA5777_W_FM_PLL_SHIFT; |