All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv
@ 2011-09-28  2:00 Axel Lin
  2011-09-28  2:01 ` [PATCH 2/6] ASoC: Remove unused "control_data" field of struct alc5623_priv Axel Lin
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Axel Lin @ 2011-09-28  2:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: Joonyoung Shim, Liam Girdwood, Mark Brown, 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/ak4671.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
index 88b29f8..2ecf128 100644
--- a/sound/soc/codecs/ak4671.c
+++ b/sound/soc/codecs/ak4671.c
@@ -26,7 +26,6 @@
 /* codec private data */
 struct ak4671_priv {
 	enum snd_soc_control_type control_type;
-	void *control_data;
 };
 
 /* ak4671 register cache & default register settings */
@@ -675,7 +674,6 @@ static int __devinit ak4671_i2c_probe(struct i2c_client *client,
 		return -ENOMEM;
 
 	i2c_set_clientdata(client, ak4671);
-	ak4671->control_data = client;
 	ak4671->control_type = SND_SOC_I2C;
 
 	ret = snd_soc_register_codec(&client->dev,
-- 
1.7.4.1




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

* [PATCH 2/6] ASoC: Remove unused "control_data" field of struct alc5623_priv
  2011-09-28  2:00 [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Axel Lin
@ 2011-09-28  2:01 ` Axel Lin
  2011-09-28  2:10 ` [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private Axel Lin
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Axel Lin @ 2011-09-28  2:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, alsa-devel, Arnaud Patard

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/alc5623.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index 0517315..557b3af 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -40,7 +40,6 @@ MODULE_PARM_DESC(caps_charge, "ALC5623 cap charge time (msecs)");
 /* codec private data */
 struct alc5623_priv {
 	enum snd_soc_control_type control_type;
-	void *control_data;
 	u8 id;
 	unsigned int sysclk;
 	u16 reg_cache[ALC5623_VENDOR_ID2+2];
@@ -1049,7 +1048,6 @@ static int alc5623_i2c_probe(struct i2c_client *client,
 	}
 
 	i2c_set_clientdata(client, alc5623);
-	alc5623->control_data = client;
 	alc5623->control_type = SND_SOC_I2C;
 
 	ret =  snd_soc_register_codec(&client->dev,
-- 
1.7.4.1




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

* [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private
  2011-09-28  2:00 [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Axel Lin
  2011-09-28  2:01 ` [PATCH 2/6] ASoC: Remove unused "control_data" field of struct alc5623_priv Axel Lin
@ 2011-09-28  2:10 ` Axel Lin
  2011-09-28 19:30     ` Timur Tabi
  2011-09-28  2:11 ` [PATCH 4/6] ASoC: Remove unused "control_data" field of struct cs42l51_private Axel Lin
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Axel Lin @ 2011-09-28  2:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, alsa-devel, Timur Tabi

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/cs4270.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 6cc8678..5830c93 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -128,7 +128,6 @@ static const char *supply_names[] = {
 /* Private data for the CS4270 */
 struct cs4270_private {
 	enum snd_soc_control_type control_type;
-	void *control_data;
 	unsigned int mclk; /* Input frequency of the MCLK pin */
 	unsigned int mode; /* The mode (I2S or left-justified) */
 	unsigned int slave_mode;
@@ -490,8 +489,6 @@ static int cs4270_probe(struct snd_soc_codec *codec)
 	struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
 	int i, ret;
 
-	codec->control_data = cs4270->control_data;
-
 	/* Tell ASoC what kind of I/O to use to read the registers.  ASoC will
 	 * then do the I2C transactions itself.
 	 */
@@ -604,7 +601,7 @@ static int cs4270_soc_suspend(struct snd_soc_codec *codec, pm_message_t mesg)
 static int cs4270_soc_resume(struct snd_soc_codec *codec)
 {
 	struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
-	struct i2c_client *i2c_client = codec->control_data;
+	struct i2c_client *i2c_client = to_i2c_client(codec->dev);
 	int reg;
 
 	regulator_bulk_enable(ARRAY_SIZE(cs4270->supplies),
@@ -690,7 +687,6 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
 	}
 
 	i2c_set_clientdata(i2c_client, cs4270);
-	cs4270->control_data = i2c_client;
 	cs4270->control_type = SND_SOC_I2C;
 
 	ret = snd_soc_register_codec(&i2c_client->dev,
-- 
1.7.4.1




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

* [PATCH 4/6] ASoC: Remove unused "control_data" field of struct cs42l51_private
  2011-09-28  2:00 [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Axel Lin
  2011-09-28  2:01 ` [PATCH 2/6] ASoC: Remove unused "control_data" field of struct alc5623_priv Axel Lin
  2011-09-28  2:10 ` [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private Axel Lin
@ 2011-09-28  2:11 ` Axel Lin
  2011-09-28  2:12 ` [PATCH 5/6] ASoC: Remove unused "control_data" field of struct max98088_priv Axel Lin
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Axel Lin @ 2011-09-28  2:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, alsa-devel, Arnaud Patard

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/cs42l51.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 8fb7070..286878d 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -42,7 +42,6 @@ enum master_slave_mode {
 
 struct cs42l51_private {
 	enum snd_soc_control_type control_type;
-	void *control_data;
 	unsigned int mclk;
 	unsigned int audio_mode;	/* The mode (I2S or left-justified) */
 	enum master_slave_mode func;
@@ -57,7 +56,7 @@ struct cs42l51_private {
 static int cs42l51_fill_cache(struct snd_soc_codec *codec)
 {
 	u8 *cache = codec->reg_cache + 1;
-	struct i2c_client *i2c_client = codec->control_data;
+	struct i2c_client *i2c_client = to_i2c_client(codec->dev);
 	s32 length;
 
 	length = i2c_smbus_read_i2c_block_data(i2c_client,
@@ -520,8 +519,6 @@ static int cs42l51_probe(struct snd_soc_codec *codec)
 	struct snd_soc_dapm_context *dapm = &codec->dapm;
 	int ret, reg;
 
-	codec->control_data = cs42l51->control_data;
-
 	ret = cs42l51_fill_cache(codec);
 	if (ret < 0) {
 		dev_err(codec->dev, "failed to fill register cache\n");
@@ -593,7 +590,6 @@ static int cs42l51_i2c_probe(struct i2c_client *i2c_client,
 	}
 
 	i2c_set_clientdata(i2c_client, cs42l51);
-	cs42l51->control_data = i2c_client;
 	cs42l51->control_type = SND_SOC_I2C;
 
 	ret =  snd_soc_register_codec(&i2c_client->dev,
-- 
1.7.4.1




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

* [PATCH 5/6] ASoC: Remove unused "control_data" field of struct max98088_priv
  2011-09-28  2:00 [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Axel Lin
                   ` (2 preceding siblings ...)
  2011-09-28  2:11 ` [PATCH 4/6] ASoC: Remove unused "control_data" field of struct cs42l51_private Axel Lin
@ 2011-09-28  2:12 ` Axel Lin
  2011-09-28  2:14 ` [PATCH 6/6] ASoC: Remove unused "control_data" field of struct max98095_priv Axel Lin
  2011-09-28 12:20 ` [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Mark Brown
  5 siblings, 0 replies; 10+ messages in thread
From: Axel Lin @ 2011-09-28  2:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Liam Girdwood, Mark Brown, alsa-devel, Peter Hsiang, Jesse Marroquin

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/max98088.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index ac65a2d..587043b 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -40,7 +40,6 @@ struct max98088_cdata {
 
 struct max98088_priv {
        enum max98088_type devtype;
-       void *control_data;
        struct max98088_pdata *pdata;
        unsigned int sysclk;
        struct max98088_cdata dai[2];
@@ -2066,7 +2065,6 @@ static int max98088_i2c_probe(struct i2c_client *i2c,
        max98088->devtype = id->driver_data;
 
        i2c_set_clientdata(i2c, max98088);
-       max98088->control_data = i2c;
        max98088->pdata = i2c->dev.platform_data;
 
        ret = snd_soc_register_codec(&i2c->dev,
-- 
1.7.4.1




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

* [PATCH 6/6] ASoC: Remove unused "control_data" field of struct max98095_priv
  2011-09-28  2:00 [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Axel Lin
                   ` (3 preceding siblings ...)
  2011-09-28  2:12 ` [PATCH 5/6] ASoC: Remove unused "control_data" field of struct max98088_priv Axel Lin
@ 2011-09-28  2:14 ` Axel Lin
  2011-09-28 12:20 ` [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Mark Brown
  5 siblings, 0 replies; 10+ messages in thread
From: Axel Lin @ 2011-09-28  2:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, alsa-devel, Peter Hsiang

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/max98095.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 668434d..8f8e255 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -40,7 +40,6 @@ struct max98095_cdata {
 
 struct max98095_priv {
 	enum max98095_type devtype;
-	void *control_data;
 	struct max98095_pdata *pdata;
 	unsigned int sysclk;
 	struct max98095_cdata dai[3];
@@ -2337,7 +2336,6 @@ static int max98095_i2c_probe(struct i2c_client *i2c,
 
 	max98095->devtype = id->driver_data;
 	i2c_set_clientdata(i2c, max98095);
-	max98095->control_data = i2c;
 	max98095->pdata = i2c->dev.platform_data;
 
 	ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_max98095,
-- 
1.7.4.1




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

* Re: [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv
  2011-09-28  2:00 [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Axel Lin
                   ` (4 preceding siblings ...)
  2011-09-28  2:14 ` [PATCH 6/6] ASoC: Remove unused "control_data" field of struct max98095_priv Axel Lin
@ 2011-09-28 12:20 ` Mark Brown
  5 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2011-09-28 12:20 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Joonyoung Shim, Liam Girdwood, alsa-devel

On Wed, Sep 28, 2011 at 10:00:18AM +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 all, thanks.

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

* Re: [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private
  2011-09-28  2:10 ` [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private Axel Lin
@ 2011-09-28 19:30     ` Timur Tabi
  0 siblings, 0 replies; 10+ messages in thread
From: Timur Tabi @ 2011-09-28 19:30 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Liam Girdwood, Mark Brown, alsa-devel

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.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---

Acked-by: Timur Tabi <timur@freescale.com>

Although Mark, it would have been nice if you had given me a chance to test this
change before applying the patch.

-- 
Timur Tabi
Linux kernel developer at Freescale


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

* Re: [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private
@ 2011-09-28 19:30     ` Timur Tabi
  0 siblings, 0 replies; 10+ messages in thread
From: Timur Tabi @ 2011-09-28 19:30 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Liam Girdwood, Mark Brown, alsa-devel

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.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---

Acked-by: Timur Tabi <timur@freescale.com>

Although Mark, it would have been nice if you had given me a chance to test this
change before applying the patch.

-- 
Timur Tabi
Linux kernel developer at Freescale

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

* Re: [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private
  2011-09-28 19:30     ` Timur Tabi
  (?)
@ 2011-09-29  9:48     ` Mark Brown
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2011-09-29  9:48 UTC (permalink / raw)
  To: Timur Tabi; +Cc: Axel Lin, linux-kernel, Liam Girdwood, alsa-devel

On Wed, Sep 28, 2011 at 02:30:53PM -0500, Timur Tabi wrote:

> Although Mark, it would have been nice if you had given me a chance to test this
> change before applying the patch.

With this sort of repetitive change by Axel I'm often not really going
to register which particular dirver he's fixing in a given patch - he's
generally very good and one of the advantages of keeping all the drivers
consistent is that it's easy to deploy subsystem wide changes.

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

end of thread, other threads:[~2011-09-29  9:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28  2:00 [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Axel Lin
2011-09-28  2:01 ` [PATCH 2/6] ASoC: Remove unused "control_data" field of struct alc5623_priv Axel Lin
2011-09-28  2:10 ` [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private Axel Lin
2011-09-28 19:30   ` Timur Tabi
2011-09-28 19:30     ` Timur Tabi
2011-09-29  9:48     ` Mark Brown
2011-09-28  2:11 ` [PATCH 4/6] ASoC: Remove unused "control_data" field of struct cs42l51_private Axel Lin
2011-09-28  2:12 ` [PATCH 5/6] ASoC: Remove unused "control_data" field of struct max98088_priv Axel Lin
2011-09-28  2:14 ` [PATCH 6/6] ASoC: Remove unused "control_data" field of struct max98095_priv Axel Lin
2011-09-28 12:20 ` [PATCH 1/6] ASoC: Remove unused "control_data" field of struct ak4671_priv Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.