aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLespiau, Damien <damien.lespiau@intel.com>2013-08-19 11:58:53 -0400
committerDave Airlie <airlied@gmail.com>2013-08-29 18:40:00 -0400
commit13ac3f5593cf0964cdb239864829e57cc6981dac (patch)
tree882b023d8dc8b3857d300333dda808c47830d8ac
parentd4e4a31da334224d686d07983517831eab999798 (diff)
drm/edid: Fix add_cea_modes() style issues
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>
-rw-r--r--drivers/gpu/drm/drm_edid.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index e01478515820..bb25ee2f9f25 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2441,10 +2441,11 @@ add_alternate_cea_modes(struct drm_connector *connector, struct edid *edid)
2441} 2441}
2442 2442
2443static int 2443static int
2444do_cea_modes (struct drm_connector *connector, u8 *db, u8 len) 2444do_cea_modes(struct drm_connector *connector, const u8 *db, u8 len)
2445{ 2445{
2446 struct drm_device *dev = connector->dev; 2446 struct drm_device *dev = connector->dev;
2447 u8 * mode, cea_mode; 2447 const u8 *mode;
2448 u8 cea_mode;
2448 int modes = 0; 2449 int modes = 0;
2449 2450
2450 for (mode = db; mode < db + len; mode++) { 2451 for (mode = db; mode < db + len; mode++) {
@@ -2501,8 +2502,9 @@ cea_db_offsets(const u8 *cea, int *start, int *end)
2501static int 2502static int
2502add_cea_modes(struct drm_connector *connector, struct edid *edid) 2503add_cea_modes(struct drm_connector *connector, struct edid *edid)
2503{ 2504{
2504 u8 * cea = drm_find_cea_extension(edid); 2505 const u8 *cea = drm_find_cea_extension(edid);
2505 u8 * db, dbl; 2506 const u8 *db;
2507 u8 dbl;
2506 int modes = 0; 2508 int modes = 0;
2507 2509
2508 if (cea && cea_revision(cea) >= 3) { 2510 if (cea && cea_revision(cea) >= 3) {
@@ -2516,7 +2518,7 @@ add_cea_modes(struct drm_connector *connector, struct edid *edid)
2516 dbl = cea_db_payload_len(db); 2518 dbl = cea_db_payload_len(db);
2517 2519
2518 if (cea_db_tag(db) == VIDEO_BLOCK) 2520 if (cea_db_tag(db) == VIDEO_BLOCK)
2519 modes += do_cea_modes (connector, db+1, dbl); 2521 modes += do_cea_modes(connector, db + 1, dbl);
2520 } 2522 }
2521 } 2523 }
2522 2524