diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-01-07 08:51:05 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-01-15 16:33:51 -0200 |
commit | 412297d31d439ba56cd4faeb3a49a6f569f40702 (patch) | |
tree | 65b1e29743c389327e8838bfe12be8fe3f9cac40 /drivers/media/video/v4l2-common.c | |
parent | 1323fbda1343f50f198bc8bd6d1d59c8b7fc45bf (diff) | |
download | blackbird-op-linux-412297d31d439ba56cd4faeb3a49a6f569f40702.tar.gz blackbird-op-linux-412297d31d439ba56cd4faeb3a49a6f569f40702.zip |
V4L/DVB (5023): Fix compilation on ppc32 architecture
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 'drivers/media/video/v4l2-common.c')
-rw-r--r-- | drivers/media/video/v4l2-common.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 752c82c37f55..b87d571e0463 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c @@ -90,8 +90,15 @@ MODULE_LICENSE("GPL"); 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: |