2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 20:53:53 +08:00

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>
This commit is contained in:
Takashi Iwai 2010-04-20 08:20:31 +02:00
parent b2c812e22d
commit d4a8ca2461
3 changed files with 18 additions and 18 deletions

View File

@ -48,7 +48,7 @@ struct aic26 {
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 unsigned int aic26_reg_read_cache(struct snd_soc_codec *codec,
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 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
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_hw_params(struct snd_pcm_substream *substream,
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 @@ static int aic26_set_sysclk(struct snd_soc_dai *codec_dai,
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_sysclk(struct snd_soc_dai *codec_dai,
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 @@ static int aic26_spi_probe(struct spi_device *spi)
/* 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;

View File

@ -2001,7 +2001,7 @@ static int twl4030_voice_set_dai_sysclk(struct snd_soc_dai *codec_dai,
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"

View File

@ -364,7 +364,7 @@ static int twl6040_power_mode_event(struct snd_soc_dapm_widget *w,
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 int twl6040_power_mode_event(struct snd_soc_dapm_widget *w,
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_add_widgets(struct snd_soc_codec *codec)
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_power_up_completion(struct snd_soc_codec *codec,
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 @@ static int twl6040_startup(struct snd_pcm_substream *substream,
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 @@ static int twl6040_hw_params(struct snd_pcm_substream *substream,
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 @@ static int twl6040_trigger(struct snd_pcm_substream *substream,
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 @@ static int twl6040_set_dai_sysclk(struct snd_soc_dai *codec_dai,
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 @@ static int __devinit twl6040_codec_probe(struct platform_device *pdev)
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 @@ cache_err:
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;