* [PATCH] ASoC: ad193x: tweak style to match other codecs
@ 2011-03-26 7:52 Mike Frysinger
2011-03-26 14:12 ` Liam Girdwood
2011-03-26 17:39 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2011-03-26 7:52 UTC (permalink / raw)
To: alsa-devel, Liam Girdwood, Mark Brown; +Cc: Scott Jiang, device-drivers-devel
From: Scott Jiang <scott.jiang@analog.com>
Rename the snd_soc_control_type field from "bus_type" to "control_type",
and drop the now unused "control_data" field.
Signed-off-by: Scott Jiang <scott.jiang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
sound/soc/codecs/ad193x.c | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c
index da46479..824529d 100644
--- a/sound/soc/codecs/ad193x.c
+++ b/sound/soc/codecs/ad193x.c
@@ -23,8 +23,7 @@
/* codec private data */
struct ad193x_priv {
- enum snd_soc_control_type bus_type;
- void *control_data;
+ enum snd_soc_control_type control_type;
int sysclk;
};
@@ -354,14 +353,12 @@ static int ad193x_probe(struct snd_soc_codec *codec)
struct snd_soc_dapm_context *dapm = &codec->dapm;
int ret;
- codec->control_data = ad193x->control_data;
- if (ad193x->bus_type == SND_SOC_I2C)
- ret = snd_soc_codec_set_cache_io(codec, 8, 8, ad193x->bus_type);
+ if (ad193x->control_type == SND_SOC_I2C)
+ ret = snd_soc_codec_set_cache_io(codec, 8, 8, ad193x->control_type);
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) {
- dev_err(codec->dev, "failed to set cache I/O: %d\n",
- ret);
+ dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
return ret;
}
@@ -408,8 +405,7 @@ static int __devinit ad193x_spi_probe(struct spi_device *spi)
return -ENOMEM;
spi_set_drvdata(spi, ad193x);
- ad193x->control_data = spi;
- ad193x->bus_type = SND_SOC_SPI;
+ ad193x->control_type = SND_SOC_SPI;
ret = snd_soc_register_codec(&spi->dev,
&soc_codec_dev_ad193x, &ad193x_dai, 1);
@@ -454,8 +450,7 @@ static int __devinit ad193x_i2c_probe(struct i2c_client *client,
return -ENOMEM;
i2c_set_clientdata(client, ad193x);
- ad193x->control_data = client;
- ad193x->bus_type = SND_SOC_I2C;
+ ad193x->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&client->dev,
&soc_codec_dev_ad193x, &ad193x_dai, 1);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: ad193x: tweak style to match other codecs
2011-03-26 7:52 [PATCH] ASoC: ad193x: tweak style to match other codecs Mike Frysinger
@ 2011-03-26 14:12 ` Liam Girdwood
2011-03-26 17:39 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-03-26 14:12 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Scott Jiang, alsa-devel, Mark Brown, device-drivers-devel
On Sat, 2011-03-26 at 03:52 -0400, Mike Frysinger wrote:
> From: Scott Jiang <scott.jiang@analog.com>
>
> Rename the snd_soc_control_type field from "bus_type" to "control_type",
> and drop the now unused "control_data" field.
>
> Signed-off-by: Scott Jiang <scott.jiang@analog.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: ad193x: tweak style to match other codecs
2011-03-26 7:52 [PATCH] ASoC: ad193x: tweak style to match other codecs Mike Frysinger
2011-03-26 14:12 ` Liam Girdwood
@ 2011-03-26 17:39 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-03-26 17:39 UTC (permalink / raw)
To: Mike Frysinger
Cc: Scott Jiang, alsa-devel, device-drivers-devel, Liam Girdwood
On Sat, Mar 26, 2011 at 03:52:20AM -0400, Mike Frysinger wrote:
> From: Scott Jiang <scott.jiang@analog.com>
>
> Rename the snd_soc_control_type field from "bus_type" to "control_type",
> and drop the now unused "control_data" field.
>
> Signed-off-by: Scott Jiang <scott.jiang@analog.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-26 17:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-26 7:52 [PATCH] ASoC: ad193x: tweak style to match other codecs Mike Frysinger
2011-03-26 14:12 ` Liam Girdwood
2011-03-26 17:39 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).