Skip to content

Commit

Permalink
ASoC: Make platform data optional for TLV320AIC3x
Browse files Browse the repository at this point in the history
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Chaithrika U S <chaithrika@ti.com>
  • Loading branch information
Mark Brown committed Aug 26, 2009
1 parent bc36681 commit 977d49e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,15 +1385,14 @@ static int aic3x_probe(struct platform_device *pdev)
socdev->card->codec = codec;
setup = socdev->codec_data;

if (!setup) {
dev_err(&pdev->dev, "No setup data supplied\n");
return -EINVAL;
if (setup) {
/* 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);
}

/* 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 */
ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
if (ret < 0) {
Expand Down

0 comments on commit 977d49e

Please sign in to comment.