ASoC: Remove unused "control_data" field of struct ak4671_priv
Subsystems (3)
PATCH 1/6 ASoC: Remove unused "control_data" field of struct ak4671_priv
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.
--- sound/soc/codecs/ak4671.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
sound/soc/codecs/ak4671.c +0 -2
@@ -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,
Signature · 1 line
1.7.4.1
PATCH 2/6 ASoC: Remove unused "control_data" field of struct alc5623_priv
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.
--- sound/soc/codecs/alc5623.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
sound/soc/codecs/alc5623.c +0 -2
@@ -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,
Signature · 1 line
1.7.4.1
PATCH 3/6 ASoC: Remove unused "control_data" field of struct cs4270_private
In reply to Axel LinThe 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.
--- sound/soc/codecs/cs4270.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
sound/soc/codecs/cs4270.c +1 -5
@@ -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,
Signature · 1 line
1.7.4.1
Re: [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private
Quoted 6 lines · Axel Lin
The
control_datafield is used to initialize the codec'scontrol_datafield, 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 <[email protected]>---
Although Mark, it would have been nice if you had given me a chance to test this change before applying the patch.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Re: [PATCH 3/6] ASoC: Remove unused "control_data" field of struct cs4270_private
Quoted 2 lines · Timur Tabi
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.
PATCH 4/6 ASoC: Remove unused "control_data" field of struct cs42l51_private
In reply to Axel LinThe 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.
--- sound/soc/codecs/cs42l51.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
sound/soc/codecs/cs42l51.c +1 -5
@@ -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,
Signature · 1 line
1.7.4.1
PATCH 5/6 ASoC: Remove unused "control_data" field of struct max98088_priv
In reply to Axel LinThe 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.
--- sound/soc/codecs/max98088.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
sound/soc/codecs/max98088.c +0 -2
@@ -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,
Signature · 1 line
1.7.4.1
PATCH 6/6 ASoC: Remove unused "control_data" field of struct max98095_priv
In reply to Axel LinThe 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.
--- sound/soc/codecs/max98095.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
sound/soc/codecs/max98095.c +0 -2
@@ -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,
Signature · 1 line
1.7.4.1
Mark Brown
AppliedQuoted 3 lines · Axel Lin
The
control_datafield is used to initialize the codec'scontrol_datafield, 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.