From patchwork Mon Oct 13 10:16:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5074881 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A0437C11AC for ; Mon, 13 Oct 2014 10:16:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF5EA201FE for ; Mon, 13 Oct 2014 10:16:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B897201EC for ; Mon, 13 Oct 2014 10:16:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753312AbaJMKQm (ORCPT ); Mon, 13 Oct 2014 06:16:42 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:44236 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753136AbaJMKQl (ORCPT ); Mon, 13 Oct 2014 06:16:41 -0400 Received: by mail-wi0-f171.google.com with SMTP id em10so6932590wid.16 for ; Mon, 13 Oct 2014 03:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9aZbfnL1BQKqoP/HQUjjdTzNdW49/jnXHxboQBAzR74=; b=FFNDlpSGE14dXZ8BrqZTge6O/aSoAVnFzywj7n+ib+HgtbF6EE0zIT3FZzdC7gWZd2 UWPzGlZ7vWjkroOWQn6FDN03UAAuSM9O7XDcNjR+nsGlpZfGTaoT/HDOR9V8/DXfUP2m SPDLSDlPuSQhRSnvFqiIMzgioWF+2LMvPACOmdSIEGJZsFxyFAfl8t5gs1YSpjXlCnnT TzWo/IZhw7r7CqYxhpRa8k2dXh5NLYnqy1sSsl3B0VuAWxC0ANZChIhhH05l8slFHFnR zzue4zTNSpMw/ES8BPA23Ix308tPtZ6kmNvsR6TUFQvWvXjAXLRhATKuhiDeIyYWUdJS b4KA== X-Received: by 10.181.13.201 with SMTP id fa9mr19693062wid.34.1413195399778; Mon, 13 Oct 2014 03:16:39 -0700 (PDT) Received: from localhost (port-4359.pppoe.wtnet.de. [84.46.17.24]) by mx.google.com with ESMTPSA id ny6sm11624838wic.22.2014.10.13.03.16.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Oct 2014 03:16:39 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Cc: Andrzej Hajda , Sean Paul , linux-samsung-soc@vger.kernel.org Subject: [PATCH 02/15] drm/dsi: Constify mipi_dsi_msg Date: Mon, 13 Oct 2014 12:16:22 +0200 Message-Id: <1413195395-3355-2-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1413195395-3355-1-git-send-email-thierry.reding@gmail.com> References: <1413195395-3355-1-git-send-email-thierry.reding@gmail.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding struct mipi_dsi_msg is a read-only structure, drivers should never need to modify it. Make this explicit by making all references to the struct const. Signed-off-by: Thierry Reding Acked-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 +- include/drm/drm_mipi_dsi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 24741d8758e8..c5f3c76bfac3 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1236,7 +1236,7 @@ static bool exynos_dsi_is_short_dsi_type(u8 type) } static ssize_t exynos_dsi_host_transfer(struct mipi_dsi_host *host, - struct mipi_dsi_msg *msg) + const struct mipi_dsi_msg *msg) { struct exynos_dsi *dsi = host_to_dsi(host); struct exynos_dsi_transfer xfer; diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index ccc3869e137b..836cc2b677d0 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -56,7 +56,7 @@ struct mipi_dsi_host_ops { int (*detach)(struct mipi_dsi_host *host, struct mipi_dsi_device *dsi); ssize_t (*transfer)(struct mipi_dsi_host *host, - struct mipi_dsi_msg *msg); + const struct mipi_dsi_msg *msg); }; /**