diff options
author | Thierry Reding <treding@nvidia.com> | 2014-05-13 13:38:36 +0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-11-13 12:43:49 +0300 |
commit | 12e6cecd55e541d3e8110f7dfbb6a601e81733ff (patch) | |
tree | b37309d828e2527a487881a9ec8d92e84913ce9f | |
parent | ecbbe59bbb1cd2973e031c5b6ba28653d66a17de (diff) | |
download | linux-12e6cecd55e541d3e8110f7dfbb6a601e81733ff.tar.xz |
drm: Use const data when creating blob properties
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>
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp_mst.c | 2 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 4 | ||||
-rw-r--r-- | include/drm/drm_dp_mst_helper.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index d4d783477c99..3ea31bc85263 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -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; diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index d9a7a7865f66..eb023d6eafb6 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c @@ -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); diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 628369c08503..ce0dd6c2d73d 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -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) diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 338fc1053835..fdcd7f271b66 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -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); |