summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2014-06-12 16:10:57 +0200
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:59:53 +0900
commit3d4c2d69a46017562e56d83bcac743b3d075ee86 (patch)
treed00daad19e523692b1c9b49dd480716183dcbee5 /sound
parente100ed01eb2baa19ae343d89f26539db93e78b90 (diff)
downloadlinux-3.10-3d4c2d69a46017562e56d83bcac743b3d075ee86.tar.gz
linux-3.10-3d4c2d69a46017562e56d83bcac743b3d075ee86.tar.bz2
linux-3.10-3d4c2d69a46017562e56d83bcac743b3d075ee86.zip
ASoC: odroidx2_max98090: Allow defining sound card name in DT
The 'samsung,model' property allows to define the sound card name in device tree, rather than relying on single name coded in the driver for all Odroid boards. Change-Id: Iad446b3d95d578d8d5390af5d0a9d8f9dcdd2a46 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/samsung/odroidx2_max98090.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/samsung/odroidx2_max98090.c b/sound/soc/samsung/odroidx2_max98090.c
index 1e5f09b2ca6..6a83f609691 100644
--- a/sound/soc/samsung/odroidx2_max98090.c
+++ b/sound/soc/samsung/odroidx2_max98090.c
@@ -70,7 +70,6 @@ static struct snd_soc_dai_link odroidx2_dai[] = {
};
static struct snd_soc_card odroidx2 = {
- .name = "odroidx2",
.owner = THIS_MODULE,
.dai_link = odroidx2_dai,
.num_links = ARRAY_SIZE(odroidx2_dai),
@@ -84,6 +83,10 @@ static int odroidx2_audio_probe(struct platform_device *pdev)
card->dev = &pdev->dev;
+ ret = snd_soc_of_parse_card_name(card, "samsung,model");
+ if (ret < 0)
+ return ret;
+
odroidx2_dai[0].codec_of_node = of_parse_phandle(np,
"samsung,audio-codec", 0);
if (!odroidx2_dai[0].codec_of_node) {