From patchwork Tue Oct 4 12:31:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9361699 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C45F608A6 for ; Tue, 4 Oct 2016 12:31:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5ED6C287E8 for ; Tue, 4 Oct 2016 12:31:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5198228870; Tue, 4 Oct 2016 12:31:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EF72287F3 for ; Tue, 4 Oct 2016 12:31:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753471AbcJDMbr (ORCPT ); Tue, 4 Oct 2016 08:31:47 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:48760 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752220AbcJDMbr (ORCPT ); Tue, 4 Oct 2016 08:31:47 -0400 Received: from avalon.ideasonboard.com (unknown [90.63.244.31]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 9A8292038D; Tue, 4 Oct 2016 14:31:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1475584263; bh=pbQVkf7VdS7qA1pxg8wVoIQoA9fzXhWsIurnTuW/66U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EstjVAD5L3mlylMldPrtea/K8M1B35ZOqjkCAgpbiEx0DOLKK3bO0fFtkaHVz0sLv BTfpZLkIORMnPap82hAxDiW5csCqNklpuUePKpmn1duQ8G/mCVLcCnj16co3Q3DoNS pwlsjcDWW37VYA33E5vqkrJn7mp+U/AWtyILIGSQ= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org, David Airlie , Tomi Valkeinen Subject: [PATCH 1/6] video: of: Constify node argument to display timing functions Date: Tue, 4 Oct 2016 15:31:34 +0300 Message-Id: <1475584299-21236-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1475584299-21236-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1475584299-21236-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The node pointer passed to the display timing functions is never modified, make it const. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen --- drivers/video/of_display_timing.c | 6 +++--- include/video/of_display_timing.h | 15 ++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) Cc: David Airlie Cc: Tomi Valkeinen diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index 8a1076beecd3..26c88f7839d2 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c @@ -110,7 +110,7 @@ static int of_parse_display_timing(const struct device_node *np, * @name: name of the timing node * @dt: display_timing struct to fill **/ -int of_get_display_timing(struct device_node *np, const char *name, +int of_get_display_timing(const struct device_node *np, const char *name, struct display_timing *dt) { struct device_node *timing_np; @@ -133,7 +133,7 @@ EXPORT_SYMBOL_GPL(of_get_display_timing); * of_get_display_timings - parse all display_timing entries from a device_node * @np: device_node with the subnodes **/ -struct display_timings *of_get_display_timings(struct device_node *np) +struct display_timings *of_get_display_timings(const struct device_node *np) { struct device_node *timings_np; struct device_node *entry; @@ -249,7 +249,7 @@ EXPORT_SYMBOL_GPL(of_get_display_timings); * of_display_timings_exist - check if a display-timings node is provided * @np: device_node with the timing **/ -int of_display_timings_exist(struct device_node *np) +int of_display_timings_exist(const struct device_node *np) { struct device_node *timings_np; diff --git a/include/video/of_display_timing.h b/include/video/of_display_timing.h index ea755b5616d8..956455fc9f9a 100644 --- a/include/video/of_display_timing.h +++ b/include/video/of_display_timing.h @@ -16,21 +16,22 @@ struct display_timings; #define OF_USE_NATIVE_MODE -1 #ifdef CONFIG_OF -int of_get_display_timing(struct device_node *np, const char *name, +int of_get_display_timing(const struct device_node *np, const char *name, struct display_timing *dt); -struct display_timings *of_get_display_timings(struct device_node *np); -int of_display_timings_exist(struct device_node *np); +struct display_timings *of_get_display_timings(const struct device_node *np); +int of_display_timings_exist(const struct device_node *np); #else -static inline int of_get_display_timing(struct device_node *np, const char *name, - struct display_timing *dt) +static inline int of_get_display_timing(const struct device_node *np, + const char *name, struct display_timing *dt) { return -ENOSYS; } -static inline struct display_timings *of_get_display_timings(struct device_node *np) +static inline struct display_timings * +of_get_display_timings(const struct device_node *np) { return NULL; } -static inline int of_display_timings_exist(struct device_node *np) +static inline int of_display_timings_exist(const struct device_node *np) { return -ENOSYS; }