aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-02-09 03:05:22 -0500
committerMark Brown <broonie@kernel.org>2015-02-09 03:24:31 -0500
commit0b1f6ec7a5fb3faff1a62afee132dac316eec63d (patch)
treef173f32060ed7007d09f247f1097bef6611de160
parentbfa76d49576599a4b9f9b7a71f23d73d6dcff735 (diff)
ASoC: rsnd: set device data before snd_soc_register_platform/component
Set device data before snd_soc_register_platform/component. Otherwise, it will use NULL pointer if user calls unbind -> bind or rmmod -> insmod Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sh/rcar/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 75308bbc2ce8..fc227d3bc021 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1268,6 +1268,8 @@ static int rsnd_probe(struct platform_device *pdev)
1268 goto exit_snd_probe; 1268 goto exit_snd_probe;
1269 } 1269 }
1270 1270
1271 dev_set_drvdata(dev, priv);
1272
1271 /* 1273 /*
1272 * asoc register 1274 * asoc register
1273 */ 1275 */
@@ -1284,8 +1286,6 @@ static int rsnd_probe(struct platform_device *pdev)
1284 goto exit_snd_soc; 1286 goto exit_snd_soc;
1285 } 1287 }
1286 1288
1287 dev_set_drvdata(dev, priv);
1288
1289 pm_runtime_enable(dev); 1289 pm_runtime_enable(dev);
1290 1290
1291 dev_info(dev, "probed\n"); 1291 dev_info(dev, "probed\n");