From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: [PATCH 2/2] drm: Use const data when creating blob properties Date: Tue, 13 May 2014 12:45:16 +0200 Message-ID: <1399977916-29437-2-git-send-email-thierry.reding@gmail.com> References: <1399977916-29437-1-git-send-email-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 654ED6EA61 for ; Tue, 13 May 2014 03:47:18 -0700 (PDT) Received: by mail-ee0-f54.google.com with SMTP id b57so268141eek.27 for ; Tue, 13 May 2014 03:47:17 -0700 (PDT) Received: from localhost (port-31899.pppoe.wtnet.de. [46.59.175.115]) by mx.google.com with ESMTPSA id m44sm39347697eeh.14.2014.05.13.03.47.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 May 2014 03:47:16 -0700 (PDT) In-Reply-To: <1399977916-29437-1-git-send-email-thierry.reding@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org From: Thierry Reding 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 --- drivers/gpu/drm/drm_crtc.c | 4 ++-- include/drm/drm_crtc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index fe511674b1c4..a6b97424be25 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -3540,7 +3540,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; @@ -3634,7 +3634,7 @@ done: * 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/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 19884cc583d9..e3ef87d9bcc8 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -925,7 +925,7 @@ 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_update_edid_property(struct drm_connector *connector, - struct edid *edid); + const struct edid *edid); extern int drm_object_property_set_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t val); -- 1.9.2