Skip to content

Commit

Permalink
ASoC: Remove unused "control_data" field of struct cs4271_private
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Sep 30, 2011
1 parent 6d447be commit 00e982a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sound/soc/codecs/cs4271.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 00e982a

Please sign in to comment.