summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-26 12:05:47 +0100
committerMark Brown <broonie@linaro.org>2013-09-26 12:05:47 +0100
commite8f00c1b01c8b547bd1e11754634ce1913c7cc72 (patch)
treef50e57dc2ce4ca1a3f84b6c036c989b5491dc8c5 /sound/soc
parent9ff50721e47ab0abb8b93159170f67262886ef0d (diff)
parent50d4a790e65f5ac91a7b2720a19e80e862b40318 (diff)
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-devm
Conflicts: sound/soc/fsl/imx-sgtl5000.c
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/imx-sgtl5000.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 78f86d870b11..6f4bdc89ae3c 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -62,7 +62,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
struct device_node *ssi_np, *codec_np;
struct platform_device *ssi_pdev;
struct i2c_client *codec_dev;
- struct imx_sgtl5000_data *data;
+ struct imx_sgtl5000_data *data = NULL;
int int_port, ext_port;
int ret;
@@ -128,7 +128,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
goto fail;
}
- data->codec_clk = devm_clk_get(&codec_dev->dev, NULL);
+ data->codec_clk = clk_get(&codec_dev->dev, NULL);
if (IS_ERR(data->codec_clk)) {
ret = PTR_ERR(data->codec_clk);
goto fail;
@@ -172,6 +172,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
return 0;
fail:
+ if (data && !IS_ERR(data->codec_clk))
+ clk_put(data->codec_clk);
if (ssi_np)
of_node_put(ssi_np);
if (codec_np)
@@ -180,6 +182,15 @@ fail:
return ret;
}
+static int imx_sgtl5000_remove(struct platform_device *pdev)
+{
+ struct imx_sgtl5000_data *data = platform_get_drvdata(pdev);
+
+ clk_put(data->codec_clk);
+
+ return 0;
+}
+
static const struct of_device_id imx_sgtl5000_dt_ids[] = {
{ .compatible = "fsl,imx-audio-sgtl5000", },
{ /* sentinel */ }