]>
Commit | Line | Data |
---|---|---|
f5b18a1b GKH |
1 | From c1db53b36633e6a7511dbec7c372f01a31528f0c Mon Sep 17 00:00:00 2001 |
2 | From: Richard Guenther <rguenther@suse.de> | |
3 | Date: Tue, 9 Feb 2010 20:16:03 -0300 | |
4 | Subject: V4L/DVB: dvb: l64781.ko broken with gcc 4.5 | |
5 | ||
6 | From: Richard Guenther <rguenther@suse.de> | |
7 | ||
8 | commit c1db53b36633e6a7511dbec7c372f01a31528f0c upstream. | |
9 | ||
10 | I'm trying to fix it on the GCC side (PR43007), but the module is | |
11 | quite stupid in using ULL constants to operate on u32 values: | |
12 | ||
13 | static int apply_frontend_param (struct dvb_frontend* fe, struct | |
14 | dvb_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 | ||
24 | which causes current GCC 4.5 to emit calls to __udivdi3 for i?86 again. | |
25 | ||
26 | This patch fixes this issue. | |
27 | ||
28 | Signed-off-by: Richard Guenther <rguenther@suse.de> | |
29 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
30 | Signed-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; |