From patchwork Thu Sep 27 14:07:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1514601 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 09EA2DF266 for ; Thu, 27 Sep 2012 14:39:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752352Ab2I0Ojd (ORCPT ); Thu, 27 Sep 2012 10:39:33 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:60415 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752216Ab2I0Ojb (ORCPT ); Thu, 27 Sep 2012 10:39:31 -0400 Received: from axis700.grange (dslb-178-001-228-192.pools.arcor-ip.net [178.1.228.192]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LouWl-1TxyIE13lr-00gr9q; Thu, 27 Sep 2012 16:09:18 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 576D1189F9F; Thu, 27 Sep 2012 16:07:35 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1THEkY-0007S9-3q; Thu, 27 Sep 2012 16:07:34 +0200 From: Guennadi Liakhovetski To: linux-media@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org, Sylwester Nawrocki , Laurent Pinchart , Hans Verkuil , Magnus Damm , linux-sh@vger.kernel.org, Mark Brown , Stephen Warren , Arnd Bergmann , Grant Likely Subject: [PATCH 03/14] OF: make a function pointer argument const Date: Thu, 27 Sep 2012 16:07:22 +0200 Message-Id: <1348754853-28619-4-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1348754853-28619-1-git-send-email-g.liakhovetski@gmx.de> References: <1348754853-28619-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:XYLkDlGeHs4m7nZdHO7tiq0MX14sX4aXySTO/1z2X4D q2lVzq5CjY7aggY1vG/QhgTiqY+Bb4Y43cdqYoCtxoLL4b0Kss 4ac1653E7Mn26IV2eKgYiQg41S0hFT+6dHOEjXX23kTwBQqxQZ i51/k74Qh0NsTvHi3690VpvOPQ/ihSfpc1K87PQEKhqtX0PMUJ GC97EB0NYg56BINMFadmSpW+WOQZHNOALe1cCwoe9hlujTiz+f R50o191hCc6i5YRk5tMyObhJc2vrLbG2fB4mU/nIPQhpB9Dx3H MzHVGVR0JO9MmJ0CQBXk3IFpYdqr5k+ozkk9+heASaq+oMGc9L 8GCejA7ms7+d+s809zBgv1Jij2tZR2urD0966xO5TWDZeovmFX yVc8bgPbTCthA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The "struct device_node *" argument of of_parse_phandle_*() can be const. Signed-off-by: Guennadi Liakhovetski --- drivers/of/base.c | 4 ++-- include/linux/of.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index d4a1c9a..5d52ad8 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -871,7 +871,7 @@ EXPORT_SYMBOL_GPL(of_property_count_strings); * of_node_put() on it when done. */ struct device_node * -of_parse_phandle(struct device_node *np, const char *phandle_name, int index) +of_parse_phandle(const struct device_node *np, const char *phandle_name, int index) { const __be32 *phandle; int size; @@ -916,7 +916,7 @@ EXPORT_SYMBOL(of_parse_phandle); * To get a device_node of the `node2' node you may call this: * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args); */ -int of_parse_phandle_with_args(struct device_node *np, const char *list_name, +int of_parse_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name, int index, struct of_phandle_args *out_args) { diff --git a/include/linux/of.h b/include/linux/of.h index 54866e6..3636fae 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -253,10 +253,10 @@ extern int of_n_size_cells(struct device_node *np); extern const struct of_device_id *of_match_node( const struct of_device_id *matches, const struct device_node *node); extern int of_modalias_node(struct device_node *node, char *modalias, int len); -extern struct device_node *of_parse_phandle(struct device_node *np, +extern struct device_node *of_parse_phandle(const struct device_node *np, const char *phandle_name, int index); -extern int of_parse_phandle_with_args(struct device_node *np, +extern int of_parse_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name, int index, struct of_phandle_args *out_args); @@ -396,7 +396,7 @@ static inline int of_property_match_string(struct device_node *np, return -ENOSYS; } -static inline struct device_node *of_parse_phandle(struct device_node *np, +static inline struct device_node *of_parse_phandle(const struct device_node *np, const char *phandle_name, int index) {