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: 5074891 Return-Path: X-Original-To: patchwork-dri-devel@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 57C57C11AD for ; Mon, 13 Oct 2014 10:16:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C696201F5 for ; Mon, 13 Oct 2014 10:16:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3D4E7201F7 for ; Mon, 13 Oct 2014 10:16:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DCF0789C46; Mon, 13 Oct 2014 03:16:41 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by gabe.freedesktop.org (Postfix) with ESMTP id AF3D389C46 for ; Mon, 13 Oct 2014 03:16:40 -0700 (PDT) Received: by mail-wi0-f174.google.com with SMTP id h11so3238614wiw.7 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 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> Cc: Andrzej Hajda , linux-samsung-soc@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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); }; /**