summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-01-07 09:51:05 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-01-07 09:51:05 -0200
commitc8afb6c4b5756848e332ee1cae77c73cfda98eea (patch)
treef41b61bc482e3e2239241d2845f65738c3a547e2 /linux/drivers
parent9a07bd90fd8593f3559fb30000ea4fc4ae0d3cfb (diff)
downloadmediapointer-dvb-s2-c8afb6c4b5756848e332ee1cae77c73cfda98eea.tar.gz
mediapointer-dvb-s2-c8afb6c4b5756848e332ee1cae77c73cfda98eea.tar.bz2
Fix compilation on ppc32 architecture
From: Mauro Carvalho Chehab <mchehab@infradead.org> There's a problem, pointed by Meelis Roos <mroos@linux.ee>, that, on ppc32 arch, with some gcc versions (noticed with prerelease 4.1.2 20061115), compilation fails, due the lack of __ucmpdi2 to do the required 64-bit comparision. This patch takes some sugestions made by Andrew Morton <akpm@osdl.org>, Stelian Pop <stelian@popies.net> and Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/v4l2-common.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index 18ac4b8d0..b940317af 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -108,8 +108,15 @@ EXPORT_SYMBOL(v4l2_video_std_fps);
char *v4l2_norm_to_name(v4l2_std_id id)
{
char *name;
+ u32 myid = id;
- switch (id) {
+ /* HACK: ppc32 architecture doesn't have __ucmpdi2 function to handle
+ 64 bit comparations. So, on that architecture, with some gcc variants,
+ compilation fails. Currently, the max value is 30bit wide.
+ */
+ BUG_ON(myid != id);
+
+ switch (myid) {
case V4L2_STD_PAL:
name="PAL"; break;
case V4L2_STD_PAL_BG: