alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: Remove unused "control_data" field of struct cs4271_private
@ 2011-09-30  2:31 Axel Lin
  2011-09-30  2:32 ` [PATCH 2/2] ASoC: Remove unused "control_data" field of struct aic3x_priv Axel Lin
  2011-09-30 11:50 ` [PATCH 1/2] ASoC: Remove unused "control_data" field of struct cs4271_private Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2011-09-30  2:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: alsa-devel, Mark Brown, Alexander Sverdlin, Liam Girdwood

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/cs4271.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index 083aab9..23d1bd5 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -156,7 +156,6 @@ static const u8 cs4271_dflt_reg[CS4271_NR_REGS] = {
 struct cs4271_private {
 	/* SND_SOC_I2C or SND_SOC_SPI */
 	enum snd_soc_control_type	bus_type;
-	void				*control_data;
 	unsigned int			mclk;
 	bool				master;
 	bool				deemph;
@@ -466,8 +465,6 @@ static int cs4271_probe(struct snd_soc_codec *codec)
 	int ret;
 	int gpio_nreset = -EINVAL;
 
-	codec->control_data = cs4271->control_data;
-
 	if (cs4271plat && gpio_is_valid(cs4271plat->gpio_nreset))
 		gpio_nreset = cs4271plat->gpio_nreset;
 
@@ -555,7 +552,6 @@ static int __devinit cs4271_spi_probe(struct spi_device *spi)
 		return -ENOMEM;
 
 	spi_set_drvdata(spi, cs4271);
-	cs4271->control_data = spi;
 	cs4271->bus_type = SND_SOC_SPI;
 
 	return snd_soc_register_codec(&spi->dev, &soc_codec_dev_cs4271,
@@ -595,7 +591,6 @@ static int __devinit cs4271_i2c_probe(struct i2c_client *client,
 		return -ENOMEM;
 
 	i2c_set_clientdata(client, cs4271);
-	cs4271->control_data = client;
 	cs4271->bus_type = SND_SOC_I2C;
 
 	return snd_soc_register_codec(&client->dev, &soc_codec_dev_cs4271,
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ASoC: Remove unused "control_data" field of struct aic3x_priv
  2011-09-30  2:31 [PATCH 1/2] ASoC: Remove unused "control_data" field of struct cs4271_private Axel Lin
@ 2011-09-30  2:32 ` Axel Lin
  2011-09-30 11:50   ` Mark Brown
  2011-09-30 11:50 ` [PATCH 1/2] ASoC: Remove unused "control_data" field of struct cs4271_private Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-09-30  2:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Vladimir Barinov, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	alsa-devel

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/tlv320aic3x.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 0963c4c..4c5eab5 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -76,7 +76,6 @@ struct aic3x_priv {
 	struct aic3x_disable_nb disable_nb[AIC3X_NUM_SUPPLIES];
 	enum snd_soc_control_type control_type;
 	struct aic3x_setup_data *setup;
-	void *control_data;
 	unsigned int sysclk;
 	struct list_head list;
 	int master;
@@ -1383,7 +1382,6 @@ static int aic3x_probe(struct snd_soc_codec *codec)
 	int ret, i;
 
 	INIT_LIST_HEAD(&aic3x->list);
-	codec->control_data = aic3x->control_data;
 	aic3x->codec = codec;
 	codec->dapm.idle_bias_off = 1;
 
@@ -1520,7 +1518,6 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
 		return -ENOMEM;
 	}
 
-	aic3x->control_data = i2c;
 	aic3x->control_type = SND_SOC_I2C;
 
 	i2c_set_clientdata(i2c, aic3x);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ASoC: Remove unused "control_data" field of struct cs4271_private
  2011-09-30  2:31 [PATCH 1/2] ASoC: Remove unused "control_data" field of struct cs4271_private Axel Lin
  2011-09-30  2:32 ` [PATCH 2/2] ASoC: Remove unused "control_data" field of struct aic3x_priv Axel Lin
@ 2011-09-30 11:50 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-09-30 11:50 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Alexander Sverdlin, Liam Girdwood, alsa-devel

On Fri, Sep 30, 2011 at 10:31:10AM +0800, Axel Lin wrote:
> The control_data field is used to initialize the codec's control_data field,
> but since this is also done by the snd-soc-cache core, the redundant
> assignment can be removed and the field can be dropped.

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] ASoC: Remove unused "control_data" field of struct aic3x_priv
  2011-09-30  2:32 ` [PATCH 2/2] ASoC: Remove unused "control_data" field of struct aic3x_priv Axel Lin
@ 2011-09-30 11:50   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-09-30 11:50 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Vladimir Barinov, Liam Girdwood, Jaroslav Kysela,
	alsa-devel

On Fri, Sep 30, 2011 at 10:32:37AM +0800, Axel Lin wrote:
> The control_data field is used to initialize the codec's control_data field,
> but since this is also done by the snd-soc-cache core, the redundant
> assignment can be removed and the field can be dropped.

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-30 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-30  2:31 [PATCH 1/2] ASoC: Remove unused "control_data" field of struct cs4271_private Axel Lin
2011-09-30  2:32 ` [PATCH 2/2] ASoC: Remove unused "control_data" field of struct aic3x_priv Axel Lin
2011-09-30 11:50   ` Mark Brown
2011-09-30 11:50 ` [PATCH 1/2] ASoC: Remove unused "control_data" field of struct cs4271_private 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).