aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-06-29 11:12:05 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-05 14:30:03 -0300
commitfbe2800c932573e90e38a9c703165839e0c00515 (patch)
tree3a4a84f5fd3c9856a1eccf75926ee0d987dbd580 /drivers/media
parentafe09f821ffa733d1cbfbf4e7cc41bd1cb8dcffb (diff)
V4L/DVB (12137): mt9v011: CodingStyle fixes
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/mt9v011.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/mt9v011.c b/drivers/media/video/mt9v011.c
index cd5e119f40a..58a61943678 100644
--- a/drivers/media/video/mt9v011.c
+++ b/drivers/media/video/mt9v011.c
@@ -71,15 +71,17 @@ static int mt9v011_read(struct v4l2_subdev *sd, unsigned char addr)
__be16 buffer;
int rc, val;
- if (1 != (rc = i2c_master_send(c, &addr, 1)))
+ rc = i2c_master_send(c, &addr, 1);
+ if (rc != 1)
v4l2_dbg(0, debug, sd,
"i2c i/o error: rc == %d (should be 1)\n", rc);
msleep(10);
- if (2 != (rc = i2c_master_recv(c, (char *)&buffer, 2)))
+ rc = i2c_master_recv(c, (char *)&buffer, 2);
+ if (rc != 2)
v4l2_dbg(0, debug, sd,
- "i2c i/o error: rc == %d (should be 1)\n", rc);
+ "i2c i/o error: rc == %d (should be 2)\n", rc);
val = be16_to_cpu(buffer);
@@ -101,7 +103,8 @@ static void mt9v011_write(struct v4l2_subdev *sd, unsigned char addr,
v4l2_dbg(2, debug, sd,
"mt9v011: writing 0x%02x 0x%04x\n", buffer[0], value);
- if (3 != (rc = i2c_master_send(c, buffer, 3)))
+ rc = i2c_master_send(c, &buffer, 3);
+ if (rc != 3)
v4l2_dbg(0, debug, sd,
"i2c i/o error: rc == %d (should be 3)\n", rc);
}