[media] s5k6aa: fix sparse warnings
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 13 Dec 2014 11:52:59 +0000 (08:52 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 23 Dec 2014 12:46:00 +0000 (10:46 -0200)
drivers/media/i2c/s5k6aa.c:351:16: warning: cast to restricted __be16
drivers/media/i2c/s5k6aa.c:351:16: warning: cast to restricted __be16
drivers/media/i2c/s5k6aa.c:351:16: warning: cast to restricted __be16
drivers/media/i2c/s5k6aa.c:351:16: warning: cast to restricted __be16

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/i2c/s5k6aa.c

index 19edafb82b5ba0892ac29528ae9375102680a9ae..b1c583239dabd24fdf395395c1c4a5c964936590 100644 (file)
@@ -348,7 +348,7 @@ static int s5k6aa_i2c_read(struct i2c_client *client, u16 addr, u16 *val)
        msg[1].buf = rbuf;
 
        ret = i2c_transfer(client->adapter, msg, 2);
-       *val = be16_to_cpu(*((u16 *)rbuf));
+       *val = be16_to_cpu(*((__be16 *)rbuf));
 
        v4l2_dbg(3, debug, client, "i2c_read: 0x%04X : 0x%04x\n", addr, *val);