aboutsummaryrefslogtreecommitdiffstats
path: root/patches.renesas/0285-ASoC-rsnd-rsnd_mod_id-return-1-if-mod-was-NULL.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.renesas/0285-ASoC-rsnd-rsnd_mod_id-return-1-if-mod-was-NULL.patch')
-rw-r--r--patches.renesas/0285-ASoC-rsnd-rsnd_mod_id-return-1-if-mod-was-NULL.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/patches.renesas/0285-ASoC-rsnd-rsnd_mod_id-return-1-if-mod-was-NULL.patch b/patches.renesas/0285-ASoC-rsnd-rsnd_mod_id-return-1-if-mod-was-NULL.patch
new file mode 100644
index 00000000000000..28dd3654556f0f
--- /dev/null
+++ b/patches.renesas/0285-ASoC-rsnd-rsnd_mod_id-return-1-if-mod-was-NULL.patch
@@ -0,0 +1,32 @@
+From 9bc0157fd67b201f2a54ff97d0ddaa8fd68366dd Mon Sep 17 00:00:00 2001
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Date: Wed, 15 Jul 2015 07:10:43 +0000
+Subject: [PATCH 285/326] ASoC: rsnd: rsnd_mod_id() return -1 if mod was NULL
+
+enabling to use same method for exception case is useful.
+
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+(cherry picked from commit 72413c107e81386a7da438bcf888ee2af5d3b72f)
+Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
+---
+ sound/soc/sh/rcar/rsnd.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
+index 9ecd15180184..46eb4daa1461 100644
+--- a/sound/soc/sh/rcar/rsnd.h
++++ b/sound/soc/sh/rcar/rsnd.h
+@@ -316,7 +316,7 @@ struct rsnd_mod {
+
+ #define rsnd_mod_to_priv(mod) ((mod)->priv)
+ #define rsnd_mod_to_dma(mod) (&(mod)->dma)
+-#define rsnd_mod_id(mod) ((mod)->id)
++#define rsnd_mod_id(mod) ((mod) ? (mod)->id : -1)
+ #define rsnd_mod_hw_start(mod) clk_enable((mod)->clk)
+ #define rsnd_mod_hw_stop(mod) clk_disable((mod)->clk)
+
+--
+2.6.2
+