]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.32.10/v4l-dvb-dvb-l64781.ko-broken-with-gcc-4.5.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.10 / v4l-dvb-dvb-l64781.ko-broken-with-gcc-4.5.patch
CommitLineData
f5b18a1b
GKH
1From c1db53b36633e6a7511dbec7c372f01a31528f0c Mon Sep 17 00:00:00 2001
2From: Richard Guenther <rguenther@suse.de>
3Date: Tue, 9 Feb 2010 20:16:03 -0300
4Subject: V4L/DVB: dvb: l64781.ko broken with gcc 4.5
5
6From: Richard Guenther <rguenther@suse.de>
7
8commit c1db53b36633e6a7511dbec7c372f01a31528f0c upstream.
9
10I'm trying to fix it on the GCC side (PR43007), but the module is
11quite stupid in using ULL constants to operate on u32 values:
12
13static int apply_frontend_param (struct dvb_frontend* fe, struct
14dvb_frontend_parameters *param)
15{
16...
17 static const u32 ppm = 8000;
18 u32 spi_bias;
19...
20
21 spi_bias *= 1000ULL;
22 spi_bias /= 1000ULL + ppm/1000;
23
24which causes current GCC 4.5 to emit calls to __udivdi3 for i?86 again.
25
26This patch fixes this issue.
27
28Signed-off-by: Richard Guenther <rguenther@suse.de>
29Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
30Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
31
32---
33 drivers/media/dvb/frontends/l64781.c | 4 ++--
34 1 file changed, 2 insertions(+), 2 deletions(-)
35
36--- a/drivers/media/dvb/frontends/l64781.c
37+++ b/drivers/media/dvb/frontends/l64781.c
38@@ -192,8 +192,8 @@ static int apply_frontend_param (struct
39 spi_bias *= qam_tab[p->constellation];
40 spi_bias /= p->code_rate_HP + 1;
41 spi_bias /= (guard_tab[p->guard_interval] + 32);
42- spi_bias *= 1000ULL;
43- spi_bias /= 1000ULL + ppm/1000;
44+ spi_bias *= 1000;
45+ spi_bias /= 1000 + ppm/1000;
46 spi_bias *= p->code_rate_HP;
47
48 val0x04 = (p->transmission_mode << 2) | p->guard_interval;