diff options
author | Mark Brown <broonie@linaro.org> | 2013-09-26 07:05:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-26 07:05:47 -0400 |
commit | e8f00c1b01c8b547bd1e11754634ce1913c7cc72 (patch) | |
tree | f50e57dc2ce4ca1a3f84b6c036c989b5491dc8c5 /sound/soc/fsl/imx-sgtl5000.c | |
parent | 9ff50721e47ab0abb8b93159170f67262886ef0d (diff) | |
parent | 50d4a790e65f5ac91a7b2720a19e80e862b40318 (diff) |
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-devm
Conflicts:
sound/soc/fsl/imx-sgtl5000.c
Diffstat (limited to 'sound/soc/fsl/imx-sgtl5000.c')
-rw-r--r-- | sound/soc/fsl/imx-sgtl5000.c | 15 |
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) | |||
62 | struct device_node *ssi_np, *codec_np; | 62 | struct device_node *ssi_np, *codec_np; |
63 | struct platform_device *ssi_pdev; | 63 | struct platform_device *ssi_pdev; |
64 | struct i2c_client *codec_dev; | 64 | struct i2c_client *codec_dev; |
65 | struct imx_sgtl5000_data *data; | 65 | struct imx_sgtl5000_data *data = NULL; |
66 | int int_port, ext_port; | 66 | int int_port, ext_port; |
67 | int ret; | 67 | int ret; |
68 | 68 | ||
@@ -128,7 +128,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
128 | goto fail; | 128 | goto fail; |
129 | } | 129 | } |
130 | 130 | ||
131 | data->codec_clk = devm_clk_get(&codec_dev->dev, NULL); | 131 | data->codec_clk = clk_get(&codec_dev->dev, NULL); |
132 | if (IS_ERR(data->codec_clk)) { | 132 | if (IS_ERR(data->codec_clk)) { |
133 | ret = PTR_ERR(data->codec_clk); | 133 | ret = PTR_ERR(data->codec_clk); |
134 | goto fail; | 134 | goto fail; |
@@ -172,6 +172,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
172 | return 0; | 172 | return 0; |
173 | 173 | ||
174 | fail: | 174 | fail: |
175 | if (data && !IS_ERR(data->codec_clk)) | ||
176 | clk_put(data->codec_clk); | ||
175 | if (ssi_np) | 177 | if (ssi_np) |
176 | of_node_put(ssi_np); | 178 | of_node_put(ssi_np); |
177 | if (codec_np) | 179 | if (codec_np) |
@@ -180,6 +182,15 @@ fail: | |||
180 | return ret; | 182 | return ret; |
181 | } | 183 | } |
182 | 184 | ||
185 | static int imx_sgtl5000_remove(struct platform_device *pdev) | ||
186 | { | ||
187 | struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); | ||
188 | |||
189 | clk_put(data->codec_clk); | ||
190 | |||
191 | return 0; | ||
192 | } | ||
193 | |||
183 | static const struct of_device_id imx_sgtl5000_dt_ids[] = { | 194 | static const struct of_device_id imx_sgtl5000_dt_ids[] = { |
184 | { .compatible = "fsl,imx-audio-sgtl5000", }, | 195 | { .compatible = "fsl,imx-audio-sgtl5000", }, |
185 | { /* sentinel */ } | 196 | { /* sentinel */ } |