summaryrefslogtreecommitdiff
path: root/sound/soc/imx/imx-3stack-sgtl5000.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/imx/imx-3stack-sgtl5000.c')
-rw-r--r--sound/soc/imx/imx-3stack-sgtl5000.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/imx/imx-3stack-sgtl5000.c b/sound/soc/imx/imx-3stack-sgtl5000.c
index e73ec62f3251..c1b7d401fbcd 100644
--- a/sound/soc/imx/imx-3stack-sgtl5000.c
+++ b/sound/soc/imx/imx-3stack-sgtl5000.c
@@ -25,6 +25,7 @@
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/fsl_devices.h>
+#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
@@ -573,6 +574,8 @@ static int __devinit imx_3stack_sgtl5000_probe(struct platform_device *pdev)
struct mxc_audio_platform_data *plat = pdev->dev.platform_data;
struct imx_3stack_priv *priv = &card_priv;
struct snd_soc_dai *sgtl5000_cpu_dai;
+ struct sgtl5000_setup_data *setup;
+
int ret = 0;
priv->pdev = pdev;
@@ -616,6 +619,14 @@ static int __devinit imx_3stack_sgtl5000_probe(struct platform_device *pdev)
goto err_card_reg;
}
+ setup = kzalloc(sizeof(struct sgtl5000_setup_data), GFP_KERNEL);
+ if (!setup) {
+ pr_err("%s: kzalloc sgtl5000_setup_data failed\n", __func__);
+ goto err_card_reg;
+ }
+ setup->clock_enable = plat->clock_enable;
+ imx_3stack_snd_devdata.codec_data = setup;
+
sgtl5000_jack_func = 1;
sgtl5000_spk_func = 1;
sgtl5000_line_in_func = 0;