diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-26 13:05:14 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-26 15:27:56 +0100 |
commit | 977d49e00d18d500d0bfe77500053d9df9c3db77 (patch) | |
tree | d20251521024edcf0700633ec575a91636817af2 /sound/soc | |
parent | bc36681fdc3276b9da4047c277349291c4cbad09 (diff) | |
download | linux-977d49e00d18d500d0bfe77500053d9df9c3db77.tar.gz linux-977d49e00d18d500d0bfe77500053d9df9c3db77.tar.bz2 linux-977d49e00d18d500d0bfe77500053d9df9c3db77.zip |
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Chaithrika U S <chaithrika@ti.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 5d547675b853..3395cf945d56 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -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) { |