aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Pouliquen <arnaud.pouliquen@st.com>2015-07-16 04:43:20 -0400
committerMark Brown <broonie@kernel.org>2015-07-16 04:59:23 -0400
commit601b9d9c7bd04f81a96896c9859cd37bd6a78d51 (patch)
treef7e1cfd77420dc4ef0fe0d3371c89e282491786c
parent9cae85f5e26fb59e4436e0676a9aceb461f30c63 (diff)
ASoC: sti-sas: fix x86 compilation issue.
Fixes for compilation warnings and errors reported by Kbuild test robot for x86_64 and i386. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/sti-sas.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index adc2c3472382..160d61a66204 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -227,8 +227,8 @@ static int stih416_dac_probe(struct snd_soc_dai *dai)
227 dac->rst = devm_reset_control_get(codec->dev, "dac_rst"); 227 dac->rst = devm_reset_control_get(codec->dev, "dac_rst");
228 if (IS_ERR(dac->rst)) { 228 if (IS_ERR(dac->rst)) {
229 dev_err(dai->codec->dev, 229 dev_err(dai->codec->dev,
230 "%s: ERROR: DAC reset control not defined (%d)!\n", 230 "%s: ERROR: DAC reset control not defined !\n",
231 __func__, (int)dac->rst); 231 __func__);
232 dac->rst = NULL; 232 dac->rst = NULL;
233 return -EFAULT; 233 return -EFAULT;
234 } 234 }
@@ -547,6 +547,7 @@ static int sti_sas_driver_probe(struct platform_device *pdev)
547{ 547{
548 struct device_node *pnode = pdev->dev.of_node; 548 struct device_node *pnode = pdev->dev.of_node;
549 struct sti_sas_data *drvdata; 549 struct sti_sas_data *drvdata;
550 const struct of_device_id *of_id;
550 551
551 /* Allocate device structure */ 552 /* Allocate device structure */
552 drvdata = devm_kzalloc(&pdev->dev, sizeof(struct sti_sas_data), 553 drvdata = devm_kzalloc(&pdev->dev, sizeof(struct sti_sas_data),
@@ -555,12 +556,13 @@ static int sti_sas_driver_probe(struct platform_device *pdev)
555 return -ENOMEM; 556 return -ENOMEM;
556 557
557 /* Populate data structure depending on compatibility */ 558 /* Populate data structure depending on compatibility */
558 if (!of_match_node(sti_sas_dev_match, pnode)->data) { 559 of_id = of_match_node(sti_sas_dev_match, pnode);
560 if (!of_id->data) {
559 dev_err(&pdev->dev, "data associated to device is missing"); 561 dev_err(&pdev->dev, "data associated to device is missing");
560 return -EINVAL; 562 return -EINVAL;
561 } 563 }
562 564
563 drvdata->dev_data = of_match_node(sti_sas_dev_match, pnode)->data; 565 drvdata->dev_data = (struct sti_sas_dev_data *)of_id->data;
564 566
565 /* Initialise device structure */ 567 /* Initialise device structure */
566 drvdata->dev = &pdev->dev; 568 drvdata->dev = &pdev->dev;