* Re: linux-next: Tree for July 31 (media/radio-tea5777)
[not found] <20120731152614.de6ebe9e0d4b8fc6645b793a@canb.auug.org.au>
@ 2012-07-31 17:22 ` Randy Dunlap
2012-07-31 19:56 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2012-07-31 17:22 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, LKML, linux-media
On 07/30/2012 10:26 PM, Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20120730:
>
on i386:
drivers/built-in.o: In function `radio_tea5777_set_freq':
radio-tea5777.c:(.text+0x4d8704): undefined reference to `__udivdi3'
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for July 31 (media/radio-tea5777)
2012-07-31 17:22 ` linux-next: Tree for July 31 (media/radio-tea5777) Randy Dunlap
@ 2012-07-31 19:56 ` Mauro Carvalho Chehab
2012-07-31 20:15 ` Randy Dunlap
2012-08-01 8:22 ` Hans de Goede
0 siblings, 2 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2012-07-31 19:56 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, linux-next, LKML, linux-media, Hans de Goede
Em 31-07-2012 14:22, Randy Dunlap escreveu:
> drivers/built-in.o: In function `radio_tea5777_set_freq':
> radio-tea5777.c:(.text+0x4d8704): undefined reference to `__udivdi3'
>
The patch below should fix it.
Thanks for reporting it!
Regards,
Mauro
[media] radio-tea5777: use library for 64bits div
From: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/radio/radio-tea5777.c b/drivers/media/radio/radio-tea5777.c
index 3e12179..5bc9fa6 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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for July 31 (media/radio-tea5777)
2012-07-31 19:56 ` Mauro Carvalho Chehab
@ 2012-07-31 20:15 ` Randy Dunlap
2012-08-01 8:22 ` Hans de Goede
1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2012-07-31 20:15 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Stephen Rothwell, linux-next, LKML, linux-media, Hans de Goede
On 07/31/2012 12:56 PM, Mauro Carvalho Chehab wrote:
> Em 31-07-2012 14:22, Randy Dunlap escreveu:
>> drivers/built-in.o: In function `radio_tea5777_set_freq':
>> radio-tea5777.c:(.text+0x4d8704): undefined reference to `__udivdi3'
>>
> The patch below should fix it.
>
> Thanks for reporting it!
>
> Regards,
> Mauro
>
> [media] radio-tea5777: use library for 64bits div
>
> From: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> 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>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Thanks.
>
> diff --git a/drivers/media/radio/radio-tea5777.c b/drivers/media/radio/radio-tea5777.c
> index 3e12179..5bc9fa6 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;
>
> --
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for July 31 (media/radio-tea5777)
2012-07-31 19:56 ` Mauro Carvalho Chehab
2012-07-31 20:15 ` Randy Dunlap
@ 2012-08-01 8:22 ` Hans de Goede
1 sibling, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2012-08-01 8:22 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, linux-media
Thanks for fixing this for me!
Acked-by: Hans de Goede <hdegoede@redhat.com>
On 07/31/2012 09:56 PM, Mauro Carvalho Chehab wrote:
> Em 31-07-2012 14:22, Randy Dunlap escreveu:
>> drivers/built-in.o: In function `radio_tea5777_set_freq':
>> radio-tea5777.c:(.text+0x4d8704): undefined reference to `__udivdi3'
>>
> The patch below should fix it.
>
> Thanks for reporting it!
>
> Regards,
> Mauro
>
> [media] radio-tea5777: use library for 64bits div
>
> From: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> 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>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> diff --git a/drivers/media/radio/radio-tea5777.c b/drivers/media/radio/radio-tea5777.c
> index 3e12179..5bc9fa6 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;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-01 8:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20120731152614.de6ebe9e0d4b8fc6645b793a@canb.auug.org.au>
2012-07-31 17:22 ` linux-next: Tree for July 31 (media/radio-tea5777) Randy Dunlap
2012-07-31 19:56 ` Mauro Carvalho Chehab
2012-07-31 20:15 ` Randy Dunlap
2012-08-01 8:22 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).