summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/ad9389b.c
diff options
context:
space:
mode:
authorMartin Bugge <marbugge@cisco.com>2013-08-14 09:25:48 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-24 04:25:23 -0300
commit350a1815ded7debd6053da22cd75379c95c8ca4e (patch)
treed1e02540c4eed30e0bd6abe7e89eb42d587b45b0 /drivers/media/i2c/ad9389b.c
parent15edc1ccdb29fe7cd55d329948c134c090a88b64 (diff)
[media] adv7604: corrected edid crc-calculation
Signed-off-by: Martin Bugge <marbugge@cisco.com> Reviewed-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c/ad9389b.c')
-rw-r--r--drivers/media/i2c/ad9389b.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/i2c/ad9389b.c b/drivers/media/i2c/ad9389b.c
index 545aabbdae68..d78fd3d634ac 100644
--- a/drivers/media/i2c/ad9389b.c
+++ b/drivers/media/i2c/ad9389b.c
@@ -983,12 +983,12 @@ static void ad9389b_check_monitor_present_status(struct v4l2_subdev *sd)
static bool edid_block_verify_crc(u8 *edid_block)
{
- int i;
u8 sum = 0;
+ int i;
- for (i = 0; i < 127; i++)
- sum += *(edid_block + i);
- return ((255 - sum + 1) == edid_block[127]);
+ for (i = 0; i < 128; i++)
+ sum += edid_block[i];
+ return sum == 0;
}
static bool edid_segment_verify_crc(struct v4l2_subdev *sd, u32 segment)