All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>,
	Lars-Peter Clausen <lars@metafoo.de>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] ASoC: Remove 'const' from the device_node pointers
Date: Sun, 9 Nov 2014 20:33:45 +0100	[thread overview]
Message-ID: <d5d74f6993e9f2392008a27a2938c58d47dc8062.1415562021.git.moinejf@free.fr> (raw)
In-Reply-To: <cover.1415562021.git.moinejf@free.fr>

>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 <moinejf@free.fr>
---
 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);
-- 
2.1.3


  parent reply	other threads:[~2014-11-09 19:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 19:40 [PATCH v2 0/2] Fix some 'const' problems Jean-Francois Moine
2014-11-09 19:40 ` Jean-Francois Moine
2014-11-09 11:38 ` [PATCH v2 2/2] ASoC: simple-card: Remove useless casts Jean-Francois Moine
2014-11-10 19:02   ` Mark Brown
2014-11-09 19:33 ` Jean-Francois Moine [this message]
2014-11-10 19:03   ` [PATCH v2 1/2] ASoC: Remove 'const' from the device_node pointers Mark Brown
2014-11-10 19:12     ` Jean-Francois Moine
2014-11-10 19:25       ` Mark Brown
2014-11-10 19:37   ` Mark Brown
2014-11-10 19:51     ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5d74f6993e9f2392008a27a2938c58d47dc8062.1415562021.git.moinejf@free.fr \
    --to=moinejf@free.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.