Skip to content

Commit

Permalink
ASoC: wm8350: Convert to direct regmap API usage
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jun 3, 2012
1 parent 6c9d8cf commit f59fef4
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions sound/soc/codecs/wm8350.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,6 @@ struct wm8350_data {
int fll_freq_in;
};

static unsigned int wm8350_codec_read(struct snd_soc_codec *codec,
unsigned int reg)
{
struct wm8350 *wm8350 = codec->control_data;
return wm8350_reg_read(wm8350, reg);
}

static int wm8350_codec_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
struct wm8350 *wm8350 = codec->control_data;
return wm8350_reg_write(wm8350, reg, value);
}

/*
* Ramp OUT1 PGA volume to minimise pops at stream startup and shutdown.
*/
Expand Down Expand Up @@ -1519,7 +1505,9 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
if (ret != 0)
return ret;

codec->control_data = wm8350;
codec->control_data = wm8350->regmap;

snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);

/* Put the codec into reset if it wasn't already */
wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_5, WM8350_CODEC_ENA);
Expand Down Expand Up @@ -1629,8 +1617,6 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8350 = {
.remove = wm8350_codec_remove,
.suspend = wm8350_suspend,
.resume = wm8350_resume,
.read = wm8350_codec_read,
.write = wm8350_codec_write,
.set_bias_level = wm8350_set_bias_level,

.controls = wm8350_snd_controls,
Expand Down

0 comments on commit f59fef4

Please sign in to comment.