drm: Add const to name field declaration in struct drm_prop_enum_list
authorJyri Sarha <jsarha@ti.com>
Tue, 30 May 2017 16:29:55 +0000 (19:29 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 8 Jun 2017 18:18:07 +0000 (21:18 +0300)
There is no reason why the name field should not be const, but
several why it should. The struct should only be used by
drm_property_create_enum() and there the name-field from the struct
is passed to drm_property_add_enum(), which takes a const char * as
a parameter.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/5dd3b6a1e20452bd8abdcbc55d1e8d7f56262266.1496161066.git.jsarha@ti.com
include/drm/drm_property.h

index 13e8c17..619868d 100644 (file)
@@ -214,7 +214,7 @@ struct drm_property_blob {
 
 struct drm_prop_enum_list {
        int type;
-       char *name;
+       const char *name;
 };
 
 #define obj_to_property(x) container_of(x, struct drm_property, base)