Commit cf4129ea authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Walleij

ASoC: ab8500-codec: remove platform data based probe

The ux500 platform hasn't used board files for a long time, and
nothing defines a ab8500_codec_platform_data, so we can just
remove the probing based on that and always use device tree
properties directly.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 79886be0
...@@ -2464,45 +2464,20 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec) ...@@ -2464,45 +2464,20 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
struct device *dev = codec->dev; struct device *dev = codec->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev); struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev);
struct ab8500_platform_data *pdata; struct ab8500_codec_platform_data codec_pdata;
struct filter_control *fc; struct filter_control *fc;
int status; int status;
dev_dbg(dev, "%s: Enter.\n", __func__); dev_dbg(dev, "%s: Enter.\n", __func__);
/* Setup AB8500 according to board-settings */ ab8500_codec_of_probe(dev, np, &codec_pdata);
pdata = dev_get_platdata(dev->parent);
if (np) { status = ab8500_audio_setup_mics(codec, &codec_pdata.amics);
if (!pdata)
pdata = devm_kzalloc(dev,
sizeof(struct ab8500_platform_data),
GFP_KERNEL);
if (pdata && !pdata->codec)
pdata->codec
= devm_kzalloc(dev,
sizeof(struct ab8500_codec_platform_data),
GFP_KERNEL);
if (!(pdata && pdata->codec))
return -ENOMEM;
ab8500_codec_of_probe(dev, np, pdata->codec);
} else {
if (!(pdata && pdata->codec)) {
dev_err(dev, "No codec platform data or DT found\n");
return -EINVAL;
}
}
status = ab8500_audio_setup_mics(codec, &pdata->codec->amics);
if (status < 0) { if (status < 0) {
pr_err("%s: Failed to setup mics (%d)!\n", __func__, status); pr_err("%s: Failed to setup mics (%d)!\n", __func__, status);
return status; return status;
} }
status = ab8500_audio_set_ear_cmv(codec, pdata->codec->ear_cmv); status = ab8500_audio_set_ear_cmv(codec, codec_pdata.ear_cmv);
if (status < 0) { if (status < 0) {
pr_err("%s: Failed to set earpiece CM-voltage (%d)!\n", pr_err("%s: Failed to set earpiece CM-voltage (%d)!\n",
__func__, status); __func__, status);
......
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