aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2009-02-23 10:12:58 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:52 -0400
commit1af1b7a2def2f0936fc95edb5dcb3871934b7852 (patch)
treedef0416c1e1f307982e119d2885671b731e96130 /drivers/media
parent051489119affd527f2834e9f8ba3e2a71bf1ca23 (diff)
V4L/DVB (10670): tw9910: bit mask operation fix on tw9910_mask_set.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/tw9910.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index 8dc3ec79a06f..0558b22fd3fb 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -460,9 +460,11 @@ static int tw9910_mask_set(struct i2c_client *client, u8 command,
460 u8 mask, u8 set) 460 u8 mask, u8 set)
461{ 461{
462 s32 val = i2c_smbus_read_byte_data(client, command); 462 s32 val = i2c_smbus_read_byte_data(client, command);
463 if (val < 0)
464 return val;
463 465
464 val &= ~mask; 466 val &= ~mask;
465 val |= set; 467 val |= set & mask;
466 468
467 return i2c_smbus_write_byte_data(client, command, val); 469 return i2c_smbus_write_byte_data(client, command, val);
468} 470}