From patchwork Sun Nov 9 19:33:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 5261821 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 167D39F2ED for ; Sun, 9 Nov 2014 19:47:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 554B72015D for ; Sun, 9 Nov 2014 19:47:53 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 627BA20158 for ; Sun, 9 Nov 2014 19:47:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 577302605C7; Sun, 9 Nov 2014 20:47:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 09E31260579; Sun, 9 Nov 2014 20:47:14 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A9F1A26055D; Sun, 9 Nov 2014 20:47:12 +0100 (CET) Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by alsa0.perex.cz (Postfix) with ESMTP id A646526055D for ; Sun, 9 Nov 2014 20:47:08 +0100 (CET) Received: from localhost (unknown [IPv6:2a01:e35:2f5c:9de0:212:bfff:fe1e:9ce4]) by smtp4-g21.free.fr (Postfix) with ESMTP id 75C944C8014; Sun, 9 Nov 2014 20:44:53 +0100 (CET) X-Mailbox-Line: From d5d74f6993e9f2392008a27a2938c58d47dc8062 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Jean-Francois Moine Date: Sun, 9 Nov 2014 20:33:45 +0100 To: Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Russell King , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v2 1/2] ASoC: Remove 'const' from the device_node pointers X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From Russell King: of_node_put() modifies the struct device_node contents. Therefore, of_node_put() definitely not treating the data pointed to as read-only, and therefore it is completely inappropriate for it to be marked "const". Signed-off-by: Jean-Francois Moine --- include/sound/soc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 7ba7130..405f967 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -886,7 +886,7 @@ struct snd_soc_platform_driver { struct snd_soc_dai_link_component { const char *name; - const struct device_node *of_node; + struct device_node *of_node; const char *dai_name; }; @@ -990,7 +990,7 @@ struct snd_soc_codec_conf { * DT/OF node, but not both. */ const char *dev_name; - const struct device_node *of_node; + struct device_node *of_node; /* * optional map of kcontrol, widget and path name prefixes that are @@ -1007,7 +1007,7 @@ struct snd_soc_aux_dev { * DT/OF node, but not both. */ const char *codec_name; - const struct device_node *codec_of_node; + struct device_node *codec_of_node; /* codec/machine specific init - e.g. add machine controls */ int (*init)(struct snd_soc_component *component);