Commit 977d49e0 authored by Mark Brown's avatar Mark Brown

ASoC: Make platform data optional for TLV320AIC3x

Now that we don't need the I2C address for the device the platform data
is redundant so allow it to be omitted.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: default avatarChaithrika U S <chaithrika@ti.com>
parent bc36681f
...@@ -1385,15 +1385,14 @@ static int aic3x_probe(struct platform_device *pdev) ...@@ -1385,15 +1385,14 @@ static int aic3x_probe(struct platform_device *pdev)
socdev->card->codec = codec; socdev->card->codec = codec;
setup = socdev->codec_data; setup = socdev->codec_data;
if (!setup) { if (setup) {
dev_err(&pdev->dev, "No setup data supplied\n"); /* setup GPIO functions */
return -EINVAL; aic3x_write(codec, AIC3X_GPIO1_REG,
(setup->gpio_func[0] & 0xf) << 4);
aic3x_write(codec, AIC3X_GPIO2_REG,
(setup->gpio_func[1] & 0xf) << 4);
} }
/* setup GPIO functions */
aic3x_write(codec, AIC3X_GPIO1_REG, (setup->gpio_func[0] & 0xf) << 4);
aic3x_write(codec, AIC3X_GPIO2_REG, (setup->gpio_func[1] & 0xf) << 4);
/* register pcms */ /* register pcms */
ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment