Commit af3751a0 authored by Mark Brown's avatar Mark Brown Committed by Liam Girdwood

ASoC: Remove unneeded control_data management from Wolfson drivers

Now soc-cache.c can figure out the I2C and SPI control data from the
device for the CODEC we don't need to manually assign it in drivers.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 26e277d7
...@@ -60,7 +60,6 @@ static const u16 wm8510_reg[WM8510_CACHEREGNUM] = { ...@@ -60,7 +60,6 @@ static const u16 wm8510_reg[WM8510_CACHEREGNUM] = {
/* codec private data */ /* codec private data */
struct wm8510_priv { struct wm8510_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
}; };
static const char *wm8510_companding[] = { "Off", "NC", "u-law", "A-law" }; static const char *wm8510_companding[] = { "Off", "NC", "u-law", "A-law" };
...@@ -561,7 +560,6 @@ static int wm8510_probe(struct snd_soc_codec *codec) ...@@ -561,7 +560,6 @@ static int wm8510_probe(struct snd_soc_codec *codec)
struct wm8510_priv *wm8510 = snd_soc_codec_get_drvdata(codec); struct wm8510_priv *wm8510 = snd_soc_codec_get_drvdata(codec);
int ret; int ret;
codec->control_data = wm8510->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8510->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8510->control_type);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", ret); printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", ret);
...@@ -611,7 +609,6 @@ static int __devinit wm8510_spi_probe(struct spi_device *spi) ...@@ -611,7 +609,6 @@ static int __devinit wm8510_spi_probe(struct spi_device *spi)
if (wm8510 == NULL) if (wm8510 == NULL)
return -ENOMEM; return -ENOMEM;
wm8510->control_data = spi;
wm8510->control_type = SND_SOC_SPI; wm8510->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8510); spi_set_drvdata(spi, wm8510);
...@@ -651,7 +648,6 @@ static __devinit int wm8510_i2c_probe(struct i2c_client *i2c, ...@@ -651,7 +648,6 @@ static __devinit int wm8510_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8510); i2c_set_clientdata(i2c, wm8510);
wm8510->control_data = i2c;
wm8510->control_type = SND_SOC_I2C; wm8510->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -41,7 +41,6 @@ static const char *wm8523_supply_names[WM8523_NUM_SUPPLIES] = { ...@@ -41,7 +41,6 @@ static const char *wm8523_supply_names[WM8523_NUM_SUPPLIES] = {
/* codec private data */ /* codec private data */
struct wm8523_priv { struct wm8523_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
u16 reg_cache[WM8523_REGISTER_COUNT]; u16 reg_cache[WM8523_REGISTER_COUNT];
struct regulator_bulk_data supplies[WM8523_NUM_SUPPLIES]; struct regulator_bulk_data supplies[WM8523_NUM_SUPPLIES];
unsigned int sysclk; unsigned int sysclk;
...@@ -419,7 +418,6 @@ static int wm8523_probe(struct snd_soc_codec *codec) ...@@ -419,7 +418,6 @@ static int wm8523_probe(struct snd_soc_codec *codec)
int ret, i; int ret, i;
codec->hw_write = (hw_write_t)i2c_master_send; codec->hw_write = (hw_write_t)i2c_master_send;
codec->control_data = wm8523->control_data;
wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0]; wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0];
wm8523->rate_constraint.count = wm8523->rate_constraint.count =
ARRAY_SIZE(wm8523->rate_constraint_list); ARRAY_SIZE(wm8523->rate_constraint_list);
...@@ -528,7 +526,6 @@ static __devinit int wm8523_i2c_probe(struct i2c_client *i2c, ...@@ -528,7 +526,6 @@ static __devinit int wm8523_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8523); i2c_set_clientdata(i2c, wm8523);
wm8523->control_data = i2c;
wm8523->control_type = SND_SOC_I2C; wm8523->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -200,7 +200,6 @@ static const char *wm8580_supply_names[WM8580_NUM_SUPPLIES] = { ...@@ -200,7 +200,6 @@ static const char *wm8580_supply_names[WM8580_NUM_SUPPLIES] = {
/* codec private data */ /* codec private data */
struct wm8580_priv { struct wm8580_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
struct regulator_bulk_data supplies[WM8580_NUM_SUPPLIES]; struct regulator_bulk_data supplies[WM8580_NUM_SUPPLIES];
u16 reg_cache[WM8580_MAX_REGISTER + 1]; u16 reg_cache[WM8580_MAX_REGISTER + 1];
struct pll_state a; struct pll_state a;
...@@ -778,7 +777,6 @@ static int wm8580_probe(struct snd_soc_codec *codec) ...@@ -778,7 +777,6 @@ static int wm8580_probe(struct snd_soc_codec *codec)
struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
int ret = 0,i; int ret = 0,i;
codec->control_data = wm8580->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8580->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8580->control_type);
if (ret < 0) { 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);
...@@ -858,7 +856,6 @@ static int wm8580_i2c_probe(struct i2c_client *i2c, ...@@ -858,7 +856,6 @@ static int wm8580_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8580); i2c_set_clientdata(i2c, wm8580);
wm8580->control_data = i2c;
wm8580->control_type = SND_SOC_I2C; wm8580->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
/* codec private data */ /* codec private data */
struct wm8711_priv { struct wm8711_priv {
enum snd_soc_control_type bus_type; enum snd_soc_control_type bus_type;
void *control_data;
u16 reg_cache[WM8711_CACHEREGNUM]; u16 reg_cache[WM8711_CACHEREGNUM];
unsigned int sysclk; unsigned int sysclk;
}; };
...@@ -378,7 +377,6 @@ static int wm8711_probe(struct snd_soc_codec *codec) ...@@ -378,7 +377,6 @@ static int wm8711_probe(struct snd_soc_codec *codec)
struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec); struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec);
int ret, reg; int ret, reg;
codec->control_data = wm8711->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8711->bus_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8711->bus_type);
if (ret < 0) { 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);
...@@ -436,7 +434,6 @@ static int __devinit wm8711_spi_probe(struct spi_device *spi) ...@@ -436,7 +434,6 @@ static int __devinit wm8711_spi_probe(struct spi_device *spi)
return -ENOMEM; return -ENOMEM;
spi_set_drvdata(spi, wm8711); spi_set_drvdata(spi, wm8711);
wm8711->control_data = spi;
wm8711->bus_type = SND_SOC_SPI; wm8711->bus_type = SND_SOC_SPI;
ret = snd_soc_register_codec(&spi->dev, ret = snd_soc_register_codec(&spi->dev,
...@@ -476,7 +473,6 @@ static __devinit int wm8711_i2c_probe(struct i2c_client *client, ...@@ -476,7 +473,6 @@ static __devinit int wm8711_i2c_probe(struct i2c_client *client,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(client, wm8711); i2c_set_clientdata(client, wm8711);
wm8711->control_data = client;
wm8711->bus_type = SND_SOC_I2C; wm8711->bus_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&client->dev, ret = snd_soc_register_codec(&client->dev,
......
...@@ -45,7 +45,6 @@ static const u16 wm8728_reg_defaults[] = { ...@@ -45,7 +45,6 @@ static const u16 wm8728_reg_defaults[] = {
/* codec private data */ /* codec private data */
struct wm8728_priv { struct wm8728_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
}; };
static const DECLARE_TLV_DB_SCALE(wm8728_tlv, -12750, 50, 1); static const DECLARE_TLV_DB_SCALE(wm8728_tlv, -12750, 50, 1);
...@@ -244,7 +243,6 @@ static int wm8728_probe(struct snd_soc_codec *codec) ...@@ -244,7 +243,6 @@ static int wm8728_probe(struct snd_soc_codec *codec)
struct wm8728_priv *wm8728 = snd_soc_codec_get_drvdata(codec); struct wm8728_priv *wm8728 = snd_soc_codec_get_drvdata(codec);
int ret; int ret;
codec->control_data = wm8728->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8728->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8728->control_type);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "wm8728: failed to configure cache I/O: %d\n", printk(KERN_ERR "wm8728: failed to configure cache I/O: %d\n",
...@@ -289,7 +287,6 @@ static int __devinit wm8728_spi_probe(struct spi_device *spi) ...@@ -289,7 +287,6 @@ static int __devinit wm8728_spi_probe(struct spi_device *spi)
if (wm8728 == NULL) if (wm8728 == NULL)
return -ENOMEM; return -ENOMEM;
wm8728->control_data = spi;
wm8728->control_type = SND_SOC_SPI; wm8728->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8728); spi_set_drvdata(spi, wm8728);
...@@ -330,7 +327,6 @@ static __devinit int wm8728_i2c_probe(struct i2c_client *i2c, ...@@ -330,7 +327,6 @@ static __devinit int wm8728_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8728); i2c_set_clientdata(i2c, wm8728);
wm8728->control_data = i2c;
wm8728->control_type = SND_SOC_I2C; wm8728->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -43,7 +43,6 @@ static const char *wm8731_supply_names[WM8731_NUM_SUPPLIES] = { ...@@ -43,7 +43,6 @@ static const char *wm8731_supply_names[WM8731_NUM_SUPPLIES] = {
/* codec private data */ /* codec private data */
struct wm8731_priv { struct wm8731_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
struct regulator_bulk_data supplies[WM8731_NUM_SUPPLIES]; struct regulator_bulk_data supplies[WM8731_NUM_SUPPLIES];
u16 reg_cache[WM8731_CACHEREGNUM]; u16 reg_cache[WM8731_CACHEREGNUM];
unsigned int sysclk; unsigned int sysclk;
...@@ -463,7 +462,6 @@ static int wm8731_probe(struct snd_soc_codec *codec) ...@@ -463,7 +462,6 @@ static int wm8731_probe(struct snd_soc_codec *codec)
int ret = 0, i; int ret = 0, i;
codec->bias_level = SND_SOC_BIAS_OFF, codec->bias_level = SND_SOC_BIAS_OFF,
codec->control_data = wm8731->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8731->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8731->control_type);
if (ret < 0) { if (ret < 0) {
...@@ -557,7 +555,6 @@ static int __devinit wm8731_spi_probe(struct spi_device *spi) ...@@ -557,7 +555,6 @@ static int __devinit wm8731_spi_probe(struct spi_device *spi)
if (wm8731 == NULL) if (wm8731 == NULL)
return -ENOMEM; return -ENOMEM;
wm8731->control_data = spi;
wm8731->control_type = SND_SOC_SPI; wm8731->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8731); spi_set_drvdata(spi, wm8731);
...@@ -598,7 +595,6 @@ static __devinit int wm8731_i2c_probe(struct i2c_client *i2c, ...@@ -598,7 +595,6 @@ static __devinit int wm8731_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8731); i2c_set_clientdata(i2c, wm8731);
wm8731->control_data = i2c;
wm8731->control_type = SND_SOC_I2C; wm8731->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -41,7 +41,6 @@ static const char *wm8741_supply_names[WM8741_NUM_SUPPLIES] = { ...@@ -41,7 +41,6 @@ static const char *wm8741_supply_names[WM8741_NUM_SUPPLIES] = {
/* codec private data */ /* codec private data */
struct wm8741_priv { struct wm8741_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
u16 reg_cache[WM8741_REGISTER_COUNT]; u16 reg_cache[WM8741_REGISTER_COUNT];
struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES]; struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
unsigned int sysclk; unsigned int sysclk;
...@@ -347,7 +346,6 @@ static int wm8741_probe(struct snd_soc_codec *codec) ...@@ -347,7 +346,6 @@ static int wm8741_probe(struct snd_soc_codec *codec)
struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
int ret = 0; int ret = 0;
codec->control_data = wm8741->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8741->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8741->control_type);
if (ret != 0) { 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);
...@@ -415,7 +413,6 @@ static int wm8741_i2c_probe(struct i2c_client *i2c, ...@@ -415,7 +413,6 @@ static int wm8741_i2c_probe(struct i2c_client *i2c,
} }
i2c_set_clientdata(i2c, wm8741); i2c_set_clientdata(i2c, wm8741);
wm8741->control_data = i2c;
wm8741->control_type = SND_SOC_I2C; wm8741->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -53,7 +53,6 @@ static const u16 wm8750_reg[] = { ...@@ -53,7 +53,6 @@ static const u16 wm8750_reg[] = {
struct wm8750_priv { struct wm8750_priv {
unsigned int sysclk; unsigned int sysclk;
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
u16 reg_cache[ARRAY_SIZE(wm8750_reg)]; u16 reg_cache[ARRAY_SIZE(wm8750_reg)];
}; };
...@@ -697,7 +696,6 @@ static int wm8750_probe(struct snd_soc_codec *codec) ...@@ -697,7 +696,6 @@ static int wm8750_probe(struct snd_soc_codec *codec)
struct wm8750_priv *wm8750 = snd_soc_codec_get_drvdata(codec); struct wm8750_priv *wm8750 = snd_soc_codec_get_drvdata(codec);
int reg, ret; int reg, ret;
codec->control_data = wm8750->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8750->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8750->control_type);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "wm8750: failed to set cache I/O: %d\n", ret); printk(KERN_ERR "wm8750: failed to set cache I/O: %d\n", ret);
...@@ -764,7 +762,6 @@ static int __devinit wm8750_spi_probe(struct spi_device *spi) ...@@ -764,7 +762,6 @@ static int __devinit wm8750_spi_probe(struct spi_device *spi)
if (wm8750 == NULL) if (wm8750 == NULL)
return -ENOMEM; return -ENOMEM;
wm8750->control_data = spi;
wm8750->control_type = SND_SOC_SPI; wm8750->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8750); spi_set_drvdata(spi, wm8750);
...@@ -805,7 +802,6 @@ static __devinit int wm8750_i2c_probe(struct i2c_client *i2c, ...@@ -805,7 +802,6 @@ static __devinit int wm8750_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8750); i2c_set_clientdata(i2c, wm8750);
wm8750->control_data = i2c;
wm8750->control_type = SND_SOC_I2C; wm8750->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -86,7 +86,6 @@ static const u16 wm8753_reg[] = { ...@@ -86,7 +86,6 @@ static const u16 wm8753_reg[] = {
/* codec private data */ /* codec private data */
struct wm8753_priv { struct wm8753_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
unsigned int sysclk; unsigned int sysclk;
unsigned int pcmclk; unsigned int pcmclk;
u16 reg_cache[ARRAY_SIZE(wm8753_reg)]; u16 reg_cache[ARRAY_SIZE(wm8753_reg)];
...@@ -1551,8 +1550,7 @@ static int wm8753_probe(struct snd_soc_codec *codec) ...@@ -1551,8 +1550,7 @@ static int wm8753_probe(struct snd_soc_codec *codec)
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
int ret = 0, reg; int ret = 0, reg;
codec->bias_level = SND_SOC_BIAS_OFF, codec->bias_level = SND_SOC_BIAS_OFF;
codec->control_data = wm8753->control_data;
INIT_DELAYED_WORK(&codec->delayed_work, wm8753_work); INIT_DELAYED_WORK(&codec->delayed_work, wm8753_work);
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8753->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8753->control_type);
...@@ -1637,7 +1635,6 @@ static int __devinit wm8753_spi_probe(struct spi_device *spi) ...@@ -1637,7 +1635,6 @@ static int __devinit wm8753_spi_probe(struct spi_device *spi)
if (wm8753 == NULL) if (wm8753 == NULL)
return -ENOMEM; return -ENOMEM;
wm8753->control_data = spi;
wm8753->control_type = SND_SOC_SPI; wm8753->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8753); spi_set_drvdata(spi, wm8753);
...@@ -1678,7 +1675,6 @@ static __devinit int wm8753_i2c_probe(struct i2c_client *i2c, ...@@ -1678,7 +1675,6 @@ static __devinit int wm8753_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8753); i2c_set_clientdata(i2c, wm8753);
wm8753->control_data = i2c;
wm8753->control_type = SND_SOC_I2C; wm8753->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
/* codec private data */ /* codec private data */
struct wm8776_priv { struct wm8776_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
u16 reg_cache[WM8776_CACHEREGNUM]; u16 reg_cache[WM8776_CACHEREGNUM];
int sysclk[2]; int sysclk[2];
}; };
...@@ -415,7 +414,6 @@ static int wm8776_probe(struct snd_soc_codec *codec) ...@@ -415,7 +414,6 @@ static int wm8776_probe(struct snd_soc_codec *codec)
struct wm8776_priv *wm8776 = snd_soc_codec_get_drvdata(codec); struct wm8776_priv *wm8776 = snd_soc_codec_get_drvdata(codec);
int ret = 0; int ret = 0;
codec->control_data = wm8776->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8776->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8776->control_type);
if (ret < 0) { 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);
...@@ -472,7 +470,6 @@ static int __devinit wm8776_spi_probe(struct spi_device *spi) ...@@ -472,7 +470,6 @@ static int __devinit wm8776_spi_probe(struct spi_device *spi)
if (wm8776 == NULL) if (wm8776 == NULL)
return -ENOMEM; return -ENOMEM;
wm8776->control_data = spi;
wm8776->control_type = SND_SOC_SPI; wm8776->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8776); spi_set_drvdata(spi, wm8776);
...@@ -513,7 +510,6 @@ static __devinit int wm8776_i2c_probe(struct i2c_client *i2c, ...@@ -513,7 +510,6 @@ static __devinit int wm8776_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8776); i2c_set_clientdata(i2c, wm8776);
wm8776->control_data = i2c;
wm8776->control_type = SND_SOC_I2C; wm8776->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -140,7 +140,6 @@ ...@@ -140,7 +140,6 @@
struct wm8900_priv { struct wm8900_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
u16 reg_cache[WM8900_MAXREG]; u16 reg_cache[WM8900_MAXREG];
u32 fll_in; /* FLL input frequency */ u32 fll_in; /* FLL input frequency */
...@@ -1189,7 +1188,6 @@ static int wm8900_probe(struct snd_soc_codec *codec) ...@@ -1189,7 +1188,6 @@ static int wm8900_probe(struct snd_soc_codec *codec)
struct wm8900_priv *wm8900 = snd_soc_codec_get_drvdata(codec); struct wm8900_priv *wm8900 = snd_soc_codec_get_drvdata(codec);
int ret = 0, reg; int ret = 0, reg;
codec->control_data = wm8900->control_data;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, wm8900->control_type); ret = snd_soc_codec_set_cache_io(codec, 8, 16, wm8900->control_type);
if (ret != 0) { 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);
...@@ -1273,7 +1271,6 @@ static int __devinit wm8900_spi_probe(struct spi_device *spi) ...@@ -1273,7 +1271,6 @@ static int __devinit wm8900_spi_probe(struct spi_device *spi)
if (wm8900 == NULL) if (wm8900 == NULL)
return -ENOMEM; return -ENOMEM;
wm8900->control_data = spi;
wm8900->control_type = SND_SOC_SPI; wm8900->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8900); spi_set_drvdata(spi, wm8900);
...@@ -1314,7 +1311,6 @@ static __devinit int wm8900_i2c_probe(struct i2c_client *i2c, ...@@ -1314,7 +1311,6 @@ static __devinit int wm8900_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8900); i2c_set_clientdata(i2c, wm8900);
wm8900->control_data = i2c;
wm8900->control_type = SND_SOC_I2C; wm8900->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -217,7 +217,6 @@ struct wm8903_priv { ...@@ -217,7 +217,6 @@ struct wm8903_priv {
u16 reg_cache[ARRAY_SIZE(wm8903_reg_defaults)]; u16 reg_cache[ARRAY_SIZE(wm8903_reg_defaults)];
int sysclk; int sysclk;
struct i2c_client *control_data;
int irq; int irq;
/* Reference counts */ /* Reference counts */
...@@ -1639,7 +1638,6 @@ static int wm8903_probe(struct snd_soc_codec *codec) ...@@ -1639,7 +1638,6 @@ static int wm8903_probe(struct snd_soc_codec *codec)
u16 val; u16 val;
init_completion(&wm8903->wseq); init_completion(&wm8903->wseq);
codec->control_data = wm8903->control_data;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C); ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
if (ret != 0) { if (ret != 0) {
...@@ -1779,7 +1777,6 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c, ...@@ -1779,7 +1777,6 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8903); i2c_set_clientdata(i2c, wm8903);
wm8903->control_data = i2c;
wm8903->irq = i2c->irq; wm8903->irq = i2c->irq;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -41,7 +41,6 @@ static const char *wm8955_supply_names[WM8955_NUM_SUPPLIES] = { ...@@ -41,7 +41,6 @@ static const char *wm8955_supply_names[WM8955_NUM_SUPPLIES] = {
/* codec private data */ /* codec private data */
struct wm8955_priv { struct wm8955_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
u16 reg_cache[WM8955_MAX_REGISTER + 1]; u16 reg_cache[WM8955_MAX_REGISTER + 1];
...@@ -904,7 +903,6 @@ static int wm8955_probe(struct snd_soc_codec *codec) ...@@ -904,7 +903,6 @@ static int wm8955_probe(struct snd_soc_codec *codec)
struct wm8955_pdata *pdata = dev_get_platdata(codec->dev); struct wm8955_pdata *pdata = dev_get_platdata(codec->dev);
int ret, i; int ret, i;
codec->control_data = wm8955->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8955->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8955->control_type);
if (ret != 0) { 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);
...@@ -1004,7 +1002,6 @@ static __devinit int wm8955_i2c_probe(struct i2c_client *i2c, ...@@ -1004,7 +1002,6 @@ static __devinit int wm8955_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8955); i2c_set_clientdata(i2c, wm8955);
wm8955->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8955, &wm8955_dai, 1); &soc_codec_dev_wm8955, &wm8955_dai, 1);
......
...@@ -289,7 +289,6 @@ static u16 wm8961_reg_defaults[] = { ...@@ -289,7 +289,6 @@ static u16 wm8961_reg_defaults[] = {
struct wm8961_priv { struct wm8961_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
int sysclk; int sysclk;
u16 reg_cache[WM8961_MAX_REGISTER]; u16 reg_cache[WM8961_MAX_REGISTER];
}; };
...@@ -964,7 +963,6 @@ static int wm8961_probe(struct snd_soc_codec *codec) ...@@ -964,7 +963,6 @@ static int wm8961_probe(struct snd_soc_codec *codec)
int ret = 0; int ret = 0;
u16 reg; u16 reg;
codec->control_data = wm8961->control_data;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C); ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
if (ret != 0) { 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);
...@@ -1096,7 +1094,6 @@ static __devinit int wm8961_i2c_probe(struct i2c_client *i2c, ...@@ -1096,7 +1094,6 @@ static __devinit int wm8961_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8961); i2c_set_clientdata(i2c, wm8961);
wm8961->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8961, &wm8961_dai, 1); &soc_codec_dev_wm8961, &wm8961_dai, 1);
......
...@@ -39,7 +39,6 @@ static struct workqueue_struct *wm8971_workq = NULL; ...@@ -39,7 +39,6 @@ static struct workqueue_struct *wm8971_workq = NULL;
/* codec private data */ /* codec private data */
struct wm8971_priv { struct wm8971_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
unsigned int sysclk; unsigned int sysclk;
}; };
...@@ -642,7 +641,6 @@ static int wm8971_probe(struct snd_soc_codec *codec) ...@@ -642,7 +641,6 @@ static int wm8971_probe(struct snd_soc_codec *codec)
pr_info("WM8971 Audio Codec %s", WM8971_VERSION); pr_info("WM8971 Audio Codec %s", WM8971_VERSION);
codec->control_data = wm8971->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8971->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8971->control_type);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "wm8971: failed to set cache I/O: %d\n", ret); printk(KERN_ERR "wm8971: failed to set cache I/O: %d\n", ret);
...@@ -725,7 +723,6 @@ static __devinit int wm8971_i2c_probe(struct i2c_client *i2c, ...@@ -725,7 +723,6 @@ static __devinit int wm8971_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8971); i2c_set_clientdata(i2c, wm8971);
wm8971->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8971, &wm8971_dai, 1); &soc_codec_dev_wm8971, &wm8971_dai, 1);
......
...@@ -52,7 +52,6 @@ static const u16 wm8974_reg[WM8974_CACHEREGNUM] = { ...@@ -52,7 +52,6 @@ static const u16 wm8974_reg[WM8974_CACHEREGNUM] = {
struct wm8974_priv { struct wm8974_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
u16 reg_cache[WM8974_CACHEREGNUM]; u16 reg_cache[WM8974_CACHEREGNUM];
}; };
...@@ -611,7 +610,6 @@ static int wm8974_probe(struct snd_soc_codec *codec) ...@@ -611,7 +610,6 @@ static int wm8974_probe(struct snd_soc_codec *codec)
struct wm8974_priv *wm8974 = snd_soc_codec_get_drvdata(codec); struct wm8974_priv *wm8974 = snd_soc_codec_get_drvdata(codec);
int ret = 0; int ret = 0;
codec->control_data = wm8974->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_I2C); ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_I2C);
if (ret < 0) { 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);
...@@ -662,7 +660,6 @@ static __devinit int wm8974_i2c_probe(struct i2c_client *i2c, ...@@ -662,7 +660,6 @@ static __devinit int wm8974_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8974); i2c_set_clientdata(i2c, wm8974);
wm8974->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8974, &wm8974_dai, 1); &soc_codec_dev_wm8974, &wm8974_dai, 1);
......
...@@ -53,7 +53,6 @@ static const u16 wm8988_reg[] = { ...@@ -53,7 +53,6 @@ static const u16 wm8988_reg[] = {
struct wm8988_priv { struct wm8988_priv {
unsigned int sysclk; unsigned int sysclk;
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
struct snd_pcm_hw_constraint_list *sysclk_constraints; struct snd_pcm_hw_constraint_list *sysclk_constraints;
u16 reg_cache[WM8988_NUM_REG]; u16 reg_cache[WM8988_NUM_REG];
}; };
...@@ -763,7 +762,6 @@ static int wm8988_probe(struct snd_soc_codec *codec) ...@@ -763,7 +762,6 @@ static int wm8988_probe(struct snd_soc_codec *codec)
int ret = 0; int ret = 0;
u16 reg; u16 reg;
codec->control_data = wm8988->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8988->control_type); ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8988->control_type);
if (ret < 0) { 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);
...@@ -826,7 +824,6 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi) ...@@ -826,7 +824,6 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi)
if (wm8988 == NULL) if (wm8988 == NULL)
return -ENOMEM; return -ENOMEM;
wm8988->control_data = spi;
wm8988->control_type = SND_SOC_SPI; wm8988->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8988); spi_set_drvdata(spi, wm8988);
...@@ -867,7 +864,6 @@ static __devinit int wm8988_i2c_probe(struct i2c_client *i2c, ...@@ -867,7 +864,6 @@ static __devinit int wm8988_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8988); i2c_set_clientdata(i2c, wm8988);
wm8988->control_data = i2c;
wm8988->control_type = SND_SOC_I2C; wm8988->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
/* codec private data */ /* codec private data */
struct wm8990_priv { struct wm8990_priv {
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
unsigned int sysclk; unsigned int sysclk;
unsigned int pcmclk; unsigned int pcmclk;
}; };
...@@ -1343,11 +1342,9 @@ static int wm8990_resume(struct snd_soc_codec *codec) ...@@ -1343,11 +1342,9 @@ static int wm8990_resume(struct snd_soc_codec *codec)
*/ */
static int wm8990_probe(struct snd_soc_codec *codec) static int wm8990_probe(struct snd_soc_codec *codec)
{ {
struct wm8990_priv *wm8990 = snd_soc_codec_get_drvdata(codec);
int ret; int ret;
u16 reg; u16 reg;
codec->control_data = wm8990->control_data;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C); ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "wm8990: failed to set cache I/O: %d\n", ret); printk(KERN_ERR "wm8990: failed to set cache I/O: %d\n", ret);
...@@ -1410,7 +1407,6 @@ static __devinit int wm8990_i2c_probe(struct i2c_client *i2c, ...@@ -1410,7 +1407,6 @@ static __devinit int wm8990_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8990); i2c_set_clientdata(i2c, wm8990);
wm8990->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8990, &wm8990_dai, 1); &soc_codec_dev_wm8990, &wm8990_dai, 1);
......
...@@ -230,7 +230,6 @@ struct wm8993_priv { ...@@ -230,7 +230,6 @@ struct wm8993_priv {
struct regulator_bulk_data supplies[WM8993_NUM_SUPPLIES]; struct regulator_bulk_data supplies[WM8993_NUM_SUPPLIES];
struct wm8993_platform_data pdata; struct wm8993_platform_data pdata;
enum snd_soc_control_type control_type; enum snd_soc_control_type control_type;
void *control_data;
int master; int master;
int sysclk_source; int sysclk_source;
int tdm_slots; int tdm_slots;
...@@ -1425,7 +1424,6 @@ static int wm8993_probe(struct snd_soc_codec *codec) ...@@ -1425,7 +1424,6 @@ static int wm8993_probe(struct snd_soc_codec *codec)
struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec); struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
int ret, i, val; int ret, i, val;
codec->control_data = wm8993->control_data;
wm8993->hubs_data.hp_startup_mode = 1; wm8993->hubs_data.hp_startup_mode = 1;
wm8993->hubs_data.dcs_codes = -2; wm8993->hubs_data.dcs_codes = -2;
...@@ -1606,7 +1604,6 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c, ...@@ -1606,7 +1604,6 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c,
return -ENOMEM; return -ENOMEM;
i2c_set_clientdata(i2c, wm8993); i2c_set_clientdata(i2c, wm8993);
wm8993->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8993, &wm8993_dai, 1); &soc_codec_dev_wm8993, &wm8993_dai, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment