From: Mauro Carvalho Chehab Date: Thu, 30 Dec 2010 14:58:37 +0000 (-0300) Subject: [media] ivtv-i2c: Fix two warnings X-Git-Tag: v3.0~2498^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9804ed9e840c461f88b290dea43173e3eed37102;p=platform%2Fkernel%2Flinux-amlogic.git [media] ivtv-i2c: Fix two warnings Fix two gcc warnings: drivers/media/video/ivtv/ivtv-i2c.c:170: warning: cast from pointer to integer of different size drivers/media/video/ivtv/ivtv-i2c.c:171: warning: cast from pointer to integer of different size $ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) They seem bogus, but, as the original code also has problems with LE/BE, just change its implementation to be clear. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 2bed430..e103b8f 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c @@ -167,8 +167,8 @@ static int get_key_adaptec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) keybuf[2] &= 0x7f; keybuf[3] |= 0x80; - *ir_key = (u32) keybuf; - *ir_raw = (u32) keybuf; + *ir_key = keybuf[3] | keybuf[2] << 8 | keybuf[1] << 16 |keybuf[0] << 24; + *ir_raw = *ir_key; return 1; }