drm: Use const data when creating blob properties
authorThierry Reding <treding@nvidia.com>
Tue, 13 May 2014 09:38:36 +0000 (11:38 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 13 Nov 2014 09:43:49 +0000 (10:43 +0100)
Creating a blob property will always copy the input data so the data
that is passed in can be const.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/i915/intel_dp_mst.c
include/drm/drm_crtc.h
include/drm/drm_dp_mst_helper.h

index d4d783477c99bfade035c2ec57a5a4ac2ccab571..3ea31bc85263e1bfcfbe1b99da983c2407fbbef6 100644 (file)
@@ -3940,7 +3940,7 @@ done:
 
 static struct drm_property_blob *
 drm_property_create_blob(struct drm_device *dev, size_t length,
-                        void *data)
+                        const void *data)
 {
        struct drm_property_blob *blob;
        int ret;
@@ -4021,7 +4021,7 @@ done:
 }
 
 int drm_mode_connector_set_path_property(struct drm_connector *connector,
-                                        char *path)
+                                        const char *path)
 {
        struct drm_device *dev = connector->dev;
        size_t size = strlen(path) + 1;
@@ -4051,7 +4051,7 @@ EXPORT_SYMBOL(drm_mode_connector_set_path_property);
  * Zero on success, errno on failure.
  */
 int drm_mode_connector_update_edid_property(struct drm_connector *connector,
-                                           struct edid *edid)
+                                           const struct edid *edid)
 {
        struct drm_device *dev = connector->dev;
        size_t size;
index d9a7a7865f66af56cfd1e62f9b7127f2016d3af2..eb023d6eafb61129e2f908a156c2e948e340de76 100644 (file)
@@ -393,7 +393,7 @@ static void intel_connector_remove_from_fbdev(struct intel_connector *connector)
 #endif
 }
 
-static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, char *pathprop)
+static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, const char *pathprop)
 {
        struct intel_dp *intel_dp = container_of(mgr, struct intel_dp, mst_mgr);
        struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
index 628369c08503a1551df194dea960b4c52fc1094c..ce0dd6c2d73d54539d27f9cef0dfe7a4983428c6 100644 (file)
@@ -978,9 +978,9 @@ extern void drm_mode_config_reset(struct drm_device *dev);
 extern void drm_mode_config_cleanup(struct drm_device *dev);
 
 extern int drm_mode_connector_set_path_property(struct drm_connector *connector,
-                                               char *path);
+                                               const char *path);
 extern int drm_mode_connector_update_edid_property(struct drm_connector *connector,
-                                               struct edid *edid);
+                                                  const struct edid *edid);
 
 static inline bool drm_property_type_is(struct drm_property *property,
                uint32_t type)
index 338fc1053835e5896a9046741c1599a54a3d24b2..fdcd7f271b660518cc822a23c9305564be3b5c3f 100644 (file)
@@ -371,7 +371,7 @@ struct drm_dp_sideband_msg_tx {
 struct drm_dp_mst_topology_mgr;
 struct drm_dp_mst_topology_cbs {
        /* create a connector for a port */
-       struct drm_connector *(*add_connector)(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, char *path);
+       struct drm_connector *(*add_connector)(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, const char *path);
        void (*destroy_connector)(struct drm_dp_mst_topology_mgr *mgr,
                                  struct drm_connector *connector);
        void (*hotplug)(struct drm_dp_mst_topology_mgr *mgr);