[PATCH 2.6.9-rc1-mm1] Disable colour conversion in the CPiA Video Camera driver

From: Luca Risolia
Date: Mon Aug 30 2004 - 02:52:43 EST


Given that colour conversion is not allowed in kernel space, this patch
disables it in the CPiA driver. The routines implementing the conversions
can be removed at all by the maintainers of the driver; however, this
patch is a good starting point and makes someone happy.

I have already submitted this patch to both the V4L mailing list
and the V4L maintainer two months ago, but it has been ignored for
some unknown reasons, so here it is again.

Please apply.

Signed-off-by: Luca Risolia <luca.risolia@xxxxxxxxxxxxxxx>

--- devel-2.6.8/drivers/media/video/cpia.c.orig 2004-08-29 11:28:14.000000000 +0200
+++ devel-2.6.8/drivers/media/video/cpia.c 2004-08-29 11:29:55.000000000 +0200
@@ -1428,14 +1428,8 @@ static void __exit proc_cpia_destroy(voi
/* supported frame palettes and depths */
static inline int valid_mode(u16 palette, u16 depth)
{
- return (palette == VIDEO_PALETTE_GREY && depth == 8) ||
- (palette == VIDEO_PALETTE_RGB555 && depth == 16) ||
- (palette == VIDEO_PALETTE_RGB565 && depth == 16) ||
- (palette == VIDEO_PALETTE_RGB24 && depth == 24) ||
- (palette == VIDEO_PALETTE_RGB32 && depth == 32) ||
- (palette == VIDEO_PALETTE_YUV422 && depth == 16) ||
- (palette == VIDEO_PALETTE_YUYV && depth == 16) ||
- (palette == VIDEO_PALETTE_UYVY && depth == 16);
+ return (palette == VIDEO_PALETTE_YUV422 && depth == 16) ||
+ (palette == VIDEO_PALETTE_YUYV && depth == 16);
}

static int match_videosize( int width, int height )

Attachment: pgp00000.pgp
Description: PGP signature