]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/edid: Fix add_cea_modes() style issues
authorLespiau, Damien <damien.lespiau@intel.com>
Mon, 19 Aug 2013 15:58:53 +0000 (16:58 +0100)
committerDave Airlie <airlied@gmail.com>
Thu, 29 Aug 2013 22:40:00 +0000 (08:40 +1000)
A few styles issues have crept in here, fix them before touching this
code again.

v2: constify arguments that can be (Ville Syrjälä)
v3: constify, but better (Ville Syrjälä)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
drivers/gpu/drm/drm_edid.c

index e01478515820895d011a823a69e1a2a9790b86a3..bb25ee2f9f25ca54650b5b2b8e070d45b07d5a60 100644 (file)
@@ -2441,10 +2441,11 @@ add_alternate_cea_modes(struct drm_connector *connector, struct edid *edid)
 }
 
 static int
-do_cea_modes (struct drm_connector *connector, u8 *db, u8 len)
+do_cea_modes(struct drm_connector *connector, const u8 *db, u8 len)
 {
        struct drm_device *dev = connector->dev;
-       u8 * mode, cea_mode;
+       const u8 *mode;
+       u8 cea_mode;
        int modes = 0;
 
        for (mode = db; mode < db + len; mode++) {
@@ -2501,8 +2502,9 @@ cea_db_offsets(const u8 *cea, int *start, int *end)
 static int
 add_cea_modes(struct drm_connector *connector, struct edid *edid)
 {
-       u8 * cea = drm_find_cea_extension(edid);
-       u8 * db, dbl;
+       const u8 *cea = drm_find_cea_extension(edid);
+       const u8 *db;
+       u8 dbl;
        int modes = 0;
 
        if (cea && cea_revision(cea) >= 3) {
@@ -2516,7 +2518,7 @@ add_cea_modes(struct drm_connector *connector, struct edid *edid)
                        dbl = cea_db_payload_len(db);
 
                        if (cea_db_tag(db) == VIDEO_BLOCK)
-                               modes += do_cea_modes (connector, db+1, dbl);
+                               modes += do_cea_modes(connector, db + 1, dbl);
                }
        }