diff options
Diffstat (limited to 'sound/soc/codecs/tlv320aic26.c')
| -rw-r--r-- | sound/soc/codecs/tlv320aic26.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index b5b7d6a03844..f0e00fd4b435 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c | |||
| @@ -49,7 +49,7 @@ struct aic26 { | |||
| 49 | static unsigned int aic26_reg_read(struct snd_soc_codec *codec, | 49 | static unsigned int aic26_reg_read(struct snd_soc_codec *codec, |
| 50 | unsigned int reg) | 50 | unsigned int reg) |
| 51 | { | 51 | { |
| 52 | struct aic26 *aic26 = codec->private_data; | 52 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
| 53 | u16 *cache = codec->reg_cache; | 53 | u16 *cache = codec->reg_cache; |
| 54 | u16 cmd, value; | 54 | u16 cmd, value; |
| 55 | u8 buffer[2]; | 55 | u8 buffer[2]; |
| @@ -93,7 +93,7 @@ static unsigned int aic26_reg_read_cache(struct snd_soc_codec *codec, | |||
| 93 | static int aic26_reg_write(struct snd_soc_codec *codec, unsigned int reg, | 93 | static int aic26_reg_write(struct snd_soc_codec *codec, unsigned int reg, |
| 94 | unsigned int value) | 94 | unsigned int value) |
| 95 | { | 95 | { |
| 96 | struct aic26 *aic26 = codec->private_data; | 96 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
| 97 | u16 *cache = codec->reg_cache; | 97 | u16 *cache = codec->reg_cache; |
| 98 | u16 cmd; | 98 | u16 cmd; |
| 99 | u8 buffer[4]; | 99 | u8 buffer[4]; |
| @@ -132,7 +132,7 @@ static int aic26_hw_params(struct snd_pcm_substream *substream, | |||
| 132 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 132 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
| 133 | struct snd_soc_device *socdev = rtd->socdev; | 133 | struct snd_soc_device *socdev = rtd->socdev; |
| 134 | struct snd_soc_codec *codec = socdev->card->codec; | 134 | struct snd_soc_codec *codec = socdev->card->codec; |
| 135 | struct aic26 *aic26 = codec->private_data; | 135 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
| 136 | int fsref, divisor, wlen, pval, jval, dval, qval; | 136 | int fsref, divisor, wlen, pval, jval, dval, qval; |
| 137 | u16 reg; | 137 | u16 reg; |
| 138 | 138 | ||
| @@ -199,7 +199,7 @@ static int aic26_hw_params(struct snd_pcm_substream *substream, | |||
| 199 | static int aic26_mute(struct snd_soc_dai *dai, int mute) | 199 | static int aic26_mute(struct snd_soc_dai *dai, int mute) |
| 200 | { | 200 | { |
| 201 | struct snd_soc_codec *codec = dai->codec; | 201 | struct snd_soc_codec *codec = dai->codec; |
| 202 | struct aic26 *aic26 = codec->private_data; | 202 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
| 203 | u16 reg = aic26_reg_read_cache(codec, AIC26_REG_DAC_GAIN); | 203 | u16 reg = aic26_reg_read_cache(codec, AIC26_REG_DAC_GAIN); |
| 204 | 204 | ||
| 205 | dev_dbg(&aic26->spi->dev, "aic26_mute(dai=%p, mute=%i)\n", | 205 | dev_dbg(&aic26->spi->dev, "aic26_mute(dai=%p, mute=%i)\n", |
| @@ -218,7 +218,7 @@ static int aic26_set_sysclk(struct snd_soc_dai *codec_dai, | |||
| 218 | int clk_id, unsigned int freq, int dir) | 218 | int clk_id, unsigned int freq, int dir) |
| 219 | { | 219 | { |
| 220 | struct snd_soc_codec *codec = codec_dai->codec; | 220 | struct snd_soc_codec *codec = codec_dai->codec; |
| 221 | struct aic26 *aic26 = codec->private_data; | 221 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
| 222 | 222 | ||
| 223 | dev_dbg(&aic26->spi->dev, "aic26_set_sysclk(dai=%p, clk_id==%i," | 223 | dev_dbg(&aic26->spi->dev, "aic26_set_sysclk(dai=%p, clk_id==%i," |
| 224 | " freq=%i, dir=%i)\n", | 224 | " freq=%i, dir=%i)\n", |
| @@ -235,7 +235,7 @@ static int aic26_set_sysclk(struct snd_soc_dai *codec_dai, | |||
| 235 | static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | 235 | static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) |
| 236 | { | 236 | { |
| 237 | struct snd_soc_codec *codec = codec_dai->codec; | 237 | struct snd_soc_codec *codec = codec_dai->codec; |
| 238 | struct aic26 *aic26 = codec->private_data; | 238 | struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); |
| 239 | 239 | ||
| 240 | dev_dbg(&aic26->spi->dev, "aic26_set_fmt(dai=%p, fmt==%i)\n", | 240 | dev_dbg(&aic26->spi->dev, "aic26_set_fmt(dai=%p, fmt==%i)\n", |
| 241 | codec_dai, fmt); | 241 | codec_dai, fmt); |
| @@ -431,7 +431,7 @@ static int aic26_spi_probe(struct spi_device *spi) | |||
| 431 | /* Setup what we can in the codec structure so that the register | 431 | /* Setup what we can in the codec structure so that the register |
| 432 | * access functions will work as expected. More will be filled | 432 | * access functions will work as expected. More will be filled |
| 433 | * out when it is probed by the SoC CODEC part of this driver */ | 433 | * out when it is probed by the SoC CODEC part of this driver */ |
| 434 | aic26->codec.private_data = aic26; | 434 | snd_soc_codec_set_drvdata(&aic26->codec, aic26); |
| 435 | aic26->codec.name = "aic26"; | 435 | aic26->codec.name = "aic26"; |
| 436 | aic26->codec.owner = THIS_MODULE; | 436 | aic26->codec.owner = THIS_MODULE; |
| 437 | aic26->codec.dai = &aic26_dai; | 437 | aic26->codec.dai = &aic26_dai; |
