public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Takashi Iwai <tiwai@suse.com>Mark Brown <broonie@kernel.org>
Subject: Applied "ASoC: use of_property_read_bool" to the asoc tree
Date: Fri, 05 Aug 2016 12:09:13 +0000	[thread overview]
Message-ID: <E1bVdw9-0002h9-KD@debutante> (raw)
In-Reply-To: <1470387411-15879-12-git-send-email-Julia.Lawall@lip6.fr>

The patch

   ASoC: use of_property_read_bool

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 7ac2a2432bbba0c3a5cf9848c768ff3c6c8a976c Mon Sep 17 00:00:00 2001
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Fri, 5 Aug 2016 10:56:51 +0200
Subject: [PATCH] ASoC: use of_property_read_bool

Use of_property_read_bool to check for the existence of a property.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2;
statement S2,S1;
@@
-       if (of_get_property(e1,e2,NULL))
+       if (of_property_read_bool(e1,e2))
        S1 else S2
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/ab8500-codec.c | 10 +++++-----
 sound/soc/sh/rcar/ssi.c         |  2 +-
 sound/soc/soc-core.c            |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 8b1d0c1a7839..f2dd86ede075 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2408,28 +2408,28 @@ static void ab8500_codec_of_probe(struct device *dev, struct device_node *np,
 {
 	u32 value;
 
-	if (of_get_property(np, "stericsson,amic1-type-single-ended", NULL))
+	if (of_property_read_bool(np, "stericsson,amic1-type-single-ended"))
 		codec->amics.mic1_type = AMIC_TYPE_SINGLE_ENDED;
 	else
 		codec->amics.mic1_type = AMIC_TYPE_DIFFERENTIAL;
 
-	if (of_get_property(np, "stericsson,amic2-type-single-ended", NULL))
+	if (of_property_read_bool(np, "stericsson,amic2-type-single-ended"))
 		codec->amics.mic2_type = AMIC_TYPE_SINGLE_ENDED;
 	else
 		codec->amics.mic2_type = AMIC_TYPE_DIFFERENTIAL;
 
 	/* Has a non-standard Vamic been requested? */
-	if (of_get_property(np, "stericsson,amic1a-bias-vamic2", NULL))
+	if (of_property_read_bool(np, "stericsson,amic1a-bias-vamic2"))
 		codec->amics.mic1a_micbias = AMIC_MICBIAS_VAMIC2;
 	else
 		codec->amics.mic1a_micbias = AMIC_MICBIAS_VAMIC1;
 
-	if (of_get_property(np, "stericsson,amic1b-bias-vamic2", NULL))
+	if (of_property_read_bool(np, "stericsson,amic1b-bias-vamic2"))
 		codec->amics.mic1b_micbias = AMIC_MICBIAS_VAMIC2;
 	else
 		codec->amics.mic1b_micbias = AMIC_MICBIAS_VAMIC1;
 
-	if (of_get_property(np, "stericsson,amic2-bias-vamic1", NULL))
+	if (of_property_read_bool(np, "stericsson,amic2-bias-vamic1"))
 		codec->amics.mic2_micbias = AMIC_MICBIAS_VAMIC1;
 	else
 		codec->amics.mic2_micbias = AMIC_MICBIAS_VAMIC2;
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 5f848f054745..6cb6db005fc4 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -928,7 +928,7 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
 		}
 
 		ops = &rsnd_ssi_non_ops;
-		if (of_get_property(np, "pio-transfer", NULL))
+		if (of_property_read_bool(np, "pio-transfer"))
 			ops = &rsnd_ssi_pio_ops;
 		else
 			ops = &rsnd_ssi_dma_ops;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 16369cad4803..ead49d032e4c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3733,7 +3733,7 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
 	 * SND_SOC_DAIFMT_CLOCK_MASK area
 	 */
 	snprintf(prop, sizeof(prop), "%scontinuous-clock", prefix);
-	if (of_get_property(np, prop, NULL))
+	if (of_property_read_bool(np, prop))
 		format |= SND_SOC_DAIFMT_CONT;
 	else
 		format |= SND_SOC_DAIFMT_GATED;
-- 
2.8.1


      reply	other threads:[~2016-08-05 12:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  8:56 [PATCH 00/11] use of_property_read_bool Julia Lawall
2016-08-05  8:56 ` [PATCH 01/11] fsl/qe: " Julia Lawall
2016-08-05  8:56 ` [PATCH 02/11] usb: host: fsl-mph-dr-of: " Julia Lawall
2016-08-05 11:26   ` [PATCH 02/11 v2] " Julia Lawall
2016-08-05  8:56 ` [PATCH 03/11] pinctrl: nomadik: " Julia Lawall
2016-08-05 11:26   ` [PATCH 03/11 v2] " Julia Lawall
2016-08-11 11:52   ` [PATCH 03/11] " Linus Walleij
2016-08-05  8:56 ` [PATCH 04/11] i2c: mpc: " Julia Lawall
2017-10-27 20:15   ` [04/11] " Wolfram Sang
2016-08-05  8:56 ` [PATCH 05/11] tty/serial: at91: " Julia Lawall
2016-08-05  8:56 ` [PATCH 06/11] mmc: sdhci-of-esdhc: " Julia Lawall
2016-08-18  7:36   ` Adrian Hunter
2016-08-22 13:39   ` Ulf Hansson
2016-08-05  8:56 ` [PATCH 07/11] phy: qcom-ufs: " Julia Lawall
2016-08-05 11:25   ` [PATCH 07/11 v2] " Julia Lawall
2016-08-12 10:14     ` Kishon Vijay Abraham I
2016-08-05  8:56 ` [PATCH 08/11] net/fsl: " Julia Lawall
2016-08-05  9:30   ` Johannes Berg
2016-08-05  9:47     ` Julia Lawall
2016-08-05 10:08     ` Julia Lawall
2016-08-05 10:12       ` Johannes Berg
2016-08-05 10:14         ` Julia Lawall
2016-08-05 11:24   ` [PATCH 08/11 v2] " Julia Lawall
2016-08-05 11:35   ` [PATCH 08/11] " Sergei Shtylyov
2016-08-05 11:38     ` Julia Lawall
2016-08-05 11:40       ` Sergei Shtylyov
2016-08-05  8:56 ` [PATCH 09/11] powerpc/mpic: " Julia Lawall
2016-08-08  6:37   ` Michael Ellerman
2016-08-05  8:56 ` [PATCH 10/11] soc: ti: knav_qmss_queue: " Julia Lawall
2016-08-05 12:47   ` Robin Murphy
2016-08-05 12:59     ` Julia Lawall
2016-08-05  8:56 ` [PATCH 11/11] ASoC: " Julia Lawall
2016-08-05 12:09   ` Mark Brown [this message]

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=E1bVdw9-0002h9-KD@debutante \
    --to=broonie@kernel.org \
    --cc=Julia.Lawall@lip6.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox