ASoC: missing conversions to snd_soc_codec_*_drvdata()
Conversions to snd_soc_codec_{get|set}_drvdata() were missing in some files
in the previous commit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 357b609..5856f7a 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -48,7 +48,7 @@
static unsigned int aic26_reg_read(struct snd_soc_codec *codec,
unsigned int reg)
{
- struct aic26 *aic26 = codec->private_data;
+ struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec);
u16 *cache = codec->reg_cache;
u16 cmd, value;
u8 buffer[2];
@@ -92,7 +92,7 @@
static int aic26_reg_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
- struct aic26 *aic26 = codec->private_data;
+ struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec);
u16 *cache = codec->reg_cache;
u16 cmd;
u8 buffer[4];
@@ -131,7 +131,7 @@
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_codec *codec = socdev->card->codec;
- struct aic26 *aic26 = codec->private_data;
+ struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec);
int fsref, divisor, wlen, pval, jval, dval, qval;
u16 reg;
@@ -198,7 +198,7 @@
static int aic26_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
- struct aic26 *aic26 = codec->private_data;
+ struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec);
u16 reg = aic26_reg_read_cache(codec, AIC26_REG_DAC_GAIN);
dev_dbg(&aic26->spi->dev, "aic26_mute(dai=%p, mute=%i)\n",
@@ -217,7 +217,7 @@
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_codec *codec = codec_dai->codec;
- struct aic26 *aic26 = codec->private_data;
+ struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec);
dev_dbg(&aic26->spi->dev, "aic26_set_sysclk(dai=%p, clk_id==%i,"
" freq=%i, dir=%i)\n",
@@ -234,7 +234,7 @@
static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{
struct snd_soc_codec *codec = codec_dai->codec;
- struct aic26 *aic26 = codec->private_data;
+ struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec);
dev_dbg(&aic26->spi->dev, "aic26_set_fmt(dai=%p, fmt==%i)\n",
codec_dai, fmt);
@@ -430,7 +430,7 @@
/* Setup what we can in the codec structure so that the register
* access functions will work as expected. More will be filled
* out when it is probed by the SoC CODEC part of this driver */
- aic26->codec.private_data = aic26;
+ snd_soc_codec_set_drvdata(&aic26->codec, aic26);
aic26->codec.name = "aic26";
aic26->codec.owner = THIS_MODULE;
aic26->codec.dai = &aic26_dai;
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 4eb5a2e..2e025a3 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -2001,7 +2001,7 @@
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_codec *codec = codec_dai->codec;
- struct twl4030_priv *twl4030 = codec->private_data;
+ struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec);
if (freq != 26000000) {
dev_err(codec->dev, "Unsupported APLL mclk: %u, the Voice"
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 108c51a..ead6d4b 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -364,7 +364,7 @@
struct snd_kcontrol *kcontrol, int event)
{
struct snd_soc_codec *codec = w->codec;
- struct twl6040_data *priv = codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
if (SND_SOC_DAPM_EVENT_ON(event))
priv->non_lp++;
@@ -378,7 +378,7 @@
static irqreturn_t twl6040_naudint_handler(int irq, void *data)
{
struct snd_soc_codec *codec = data;
- struct twl6040_data *priv = codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
u8 intid;
twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &intid, TWL6040_REG_INTID);
@@ -636,7 +636,7 @@
static int twl6040_power_up_completion(struct snd_soc_codec *codec,
int naudint)
{
- struct twl6040_data *priv = codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
int time_left;
u8 intid;
@@ -660,7 +660,7 @@
static int twl6040_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
- struct twl6040_data *priv = codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
int audpwron = priv->audpwron;
int naudint = priv->naudint;
int ret;
@@ -753,7 +753,7 @@
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_codec *codec = socdev->card->codec;
- struct twl6040_data *priv = codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
if (!priv->sysclk) {
dev_err(codec->dev,
@@ -786,7 +786,7 @@
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_codec *codec = socdev->card->codec;
- struct twl6040_data *priv = codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
u8 lppllctl;
int rate;
@@ -822,7 +822,7 @@
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_codec *codec = socdev->card->codec;
- struct twl6040_data *priv = codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
@@ -849,7 +849,7 @@
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_codec *codec = codec_dai->codec;
- struct twl6040_data *priv = codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
u8 hppllctl, lppllctl;
hppllctl = twl6040_read_reg_cache(codec, TWL6040_REG_HPPLLCTL);
@@ -1095,7 +1095,7 @@
codec->read = twl6040_read_reg_cache;
codec->write = twl6040_write;
codec->set_bias_level = twl6040_set_bias_level;
- codec->private_data = priv;
+ snd_soc_codec_set_drvdata(codec, priv);
codec->dai = &twl6040_dai;
codec->num_dai = 1;
codec->reg_cache_size = ARRAY_SIZE(twl6040_reg);
@@ -1183,7 +1183,7 @@
static int __devexit twl6040_codec_remove(struct platform_device *pdev)
{
- struct twl6040_data *priv = twl6040_codec->private_data;
+ struct twl6040_data *priv = snd_soc_codec_get_drvdata(twl6040_codec);
int audpwron = priv->audpwron;
int naudint = priv->naudint;