Commit 119bfef2 authored by Scott Jiang's avatar Scott Jiang Committed by Mark Brown

ASoC: ad193x: tweak style to match other codecs

Rename the snd_soc_control_type field from "bus_type" to "control_type",
and drop the now unused "control_data" field.
Signed-off-by: default avatarScott Jiang <scott.jiang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 4b2ffc20
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
/* codec private data */ /* codec private data */
struct ad193x_priv { struct ad193x_priv {
enum snd_soc_control_type bus_type; enum snd_soc_control_type control_type;
void *control_data;
int sysclk; int sysclk;
}; };
...@@ -354,14 +353,12 @@ static int ad193x_probe(struct snd_soc_codec *codec) ...@@ -354,14 +353,12 @@ static int ad193x_probe(struct snd_soc_codec *codec)
struct snd_soc_dapm_context *dapm = &codec->dapm; struct snd_soc_dapm_context *dapm = &codec->dapm;
int ret; int ret;
codec->control_data = ad193x->control_data; if (ad193x->control_type == SND_SOC_I2C)
if (ad193x->bus_type == SND_SOC_I2C) ret = snd_soc_codec_set_cache_io(codec, 8, 8, ad193x->control_type);
ret = snd_soc_codec_set_cache_io(codec, 8, 8, ad193x->bus_type);
else else
ret = snd_soc_codec_set_cache_io(codec, 16, 8, ad193x->bus_type); ret = snd_soc_codec_set_cache_io(codec, 16, 8, ad193x->control_type);
if (ret < 0) { if (ret < 0) {
dev_err(codec->dev, "failed to set cache I/O: %d\n", dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
ret);
return ret; return ret;
} }
...@@ -408,8 +405,7 @@ static int __devinit ad193x_spi_probe(struct spi_device *spi) ...@@ -408,8 +405,7 @@ static int __devinit ad193x_spi_probe(struct spi_device *spi)
return -ENOMEM; return -ENOMEM;
spi_set_drvdata(spi, ad193x); spi_set_drvdata(spi, ad193x);
ad193x->control_data = spi; ad193x->control_type = SND_SOC_SPI;
ad193x->bus_type = SND_SOC_SPI;
ret = snd_soc_register_codec(&spi->dev, ret = snd_soc_register_codec(&spi->dev,
&soc_codec_dev_ad193x, &ad193x_dai, 1); &soc_codec_dev_ad193x, &ad193x_dai, 1);
...@@ -454,8 +450,7 @@ static int __devinit ad193x_i2c_probe(struct i2c_client *client, ...@@ -454,8 +450,7 @@ static int __devinit ad193x_i2c_probe(struct i2c_client *client,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(client, ad193x); i2c_set_clientdata(client, ad193x);
ad193x->control_data = client; ad193x->control_type = SND_SOC_I2C;
ad193x->bus_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&client->dev, ret = snd_soc_register_codec(&client->dev,
&soc_codec_dev_ad193x, &ad193x_dai, 1); &soc_codec_dev_ad193x, &ad193x_dai, 1);
......
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