diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-29 10:12:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-05 13:30:03 -0400 |
commit | fbe2800c932573e90e38a9c703165839e0c00515 (patch) | |
tree | 3a4a84f5fd3c9856a1eccf75926ee0d987dbd580 /drivers/media/video/mt9v011.c | |
parent | afe09f821ffa733d1cbfbf4e7cc41bd1cb8dcffb (diff) |
V4L/DVB (12137): mt9v011: CodingStyle fixes
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9v011.c')
-rw-r--r-- | drivers/media/video/mt9v011.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/mt9v011.c b/drivers/media/video/mt9v011.c index cd5e119f40a5..58a619436783 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) | |||
71 | __be16 buffer; | 71 | __be16 buffer; |
72 | int rc, val; | 72 | int rc, val; |
73 | 73 | ||
74 | if (1 != (rc = i2c_master_send(c, &addr, 1))) | 74 | rc = i2c_master_send(c, &addr, 1); |
75 | if (rc != 1) | ||
75 | v4l2_dbg(0, debug, sd, | 76 | v4l2_dbg(0, debug, sd, |
76 | "i2c i/o error: rc == %d (should be 1)\n", rc); | 77 | "i2c i/o error: rc == %d (should be 1)\n", rc); |
77 | 78 | ||
78 | msleep(10); | 79 | msleep(10); |
79 | 80 | ||
80 | if (2 != (rc = i2c_master_recv(c, (char *)&buffer, 2))) | 81 | rc = i2c_master_recv(c, (char *)&buffer, 2); |
82 | if (rc != 2) | ||
81 | v4l2_dbg(0, debug, sd, | 83 | v4l2_dbg(0, debug, sd, |
82 | "i2c i/o error: rc == %d (should be 1)\n", rc); | 84 | "i2c i/o error: rc == %d (should be 2)\n", rc); |
83 | 85 | ||
84 | val = be16_to_cpu(buffer); | 86 | val = be16_to_cpu(buffer); |
85 | 87 | ||
@@ -101,7 +103,8 @@ static void mt9v011_write(struct v4l2_subdev *sd, unsigned char addr, | |||
101 | 103 | ||
102 | v4l2_dbg(2, debug, sd, | 104 | v4l2_dbg(2, debug, sd, |
103 | "mt9v011: writing 0x%02x 0x%04x\n", buffer[0], value); | 105 | "mt9v011: writing 0x%02x 0x%04x\n", buffer[0], value); |
104 | if (3 != (rc = i2c_master_send(c, buffer, 3))) | 106 | rc = i2c_master_send(c, &buffer, 3); |
107 | if (rc != 3) | ||
105 | v4l2_dbg(0, debug, sd, | 108 | v4l2_dbg(0, debug, sd, |
106 | "i2c i/o error: rc == %d (should be 3)\n", rc); | 109 | "i2c i/o error: rc == %d (should be 3)\n", rc); |
107 | } | 110 | } |