]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drm: fix typo in edid vendor parsing.
authorDave Airlie <airlied@redhat.com>
Thu, 2 Apr 2009 23:10:33 +0000 (09:10 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 2 Apr 2009 23:10:33 +0000 (09:10 +1000)
Should be,

    edid_vendor[2] = (edid->mfg_id[1] & 0x1f) +  '@';

Since vendor ID has only two bytes only, I am somewhat surprised why gcc
doesn't complain this.

Reported-by: Guo, Chaohong <chaohong.guo@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_edid.c

index c67400067b8573c9be015391601152dc4acd6f90..2c4a340e682f576ca5cf3d4ffcebaf1ed99716df 100644 (file)
@@ -162,7 +162,7 @@ static bool edid_vendor(struct edid *edid, char *vendor)
        edid_vendor[0] = ((edid->mfg_id[0] & 0x7c) >> 2) + '@';
        edid_vendor[1] = (((edid->mfg_id[0] & 0x3) << 3) |
                          ((edid->mfg_id[1] & 0xe0) >> 5)) + '@';
-       edid_vendor[2] = (edid->mfg_id[2] & 0x1f) + '@';
+       edid_vendor[2] = (edid->mfg_id[1] & 0x1f) + '@';
 
        return !strncmp(edid_vendor, vendor, 3);
 }