[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50183865.9090700@redhat.com>
Date: Tue, 31 Jul 2012 16:56:21 -0300
From: Mauro Carvalho Chehab <mchehab@...hat.com>
To: Randy Dunlap <rdunlap@...otime.net>
CC: Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
linux-media <linux-media@...r.kernel.org>,
Hans de Goede <hdegoede@...hat.com>
Subject: Re: linux-next: Tree for July 31 (media/radio-tea5777)
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@...hat.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@...otime.net>
Cc: Hans de Goede <hdegoede@...hat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@...hat.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@...ex.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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists