diff options
Diffstat (limited to 'sound/soc/codecs/wm9081.c')
-rw-r--r-- | sound/soc/codecs/wm9081.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 3a184fcb702b..13186fb4dcb4 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -521,7 +521,7 @@ static int fll_factors(struct _fll_div *fll_div, unsigned int Fref, | |||
521 | static int wm9081_set_fll(struct snd_soc_codec *codec, int fll_id, | 521 | static int wm9081_set_fll(struct snd_soc_codec *codec, int fll_id, |
522 | unsigned int Fref, unsigned int Fout) | 522 | unsigned int Fref, unsigned int Fout) |
523 | { | 523 | { |
524 | struct wm9081_priv *wm9081 = codec->private_data; | 524 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); |
525 | u16 reg1, reg4, reg5; | 525 | u16 reg1, reg4, reg5; |
526 | struct _fll_div fll_div; | 526 | struct _fll_div fll_div; |
527 | int ret; | 527 | int ret; |
@@ -607,7 +607,7 @@ static int wm9081_set_fll(struct snd_soc_codec *codec, int fll_id, | |||
607 | 607 | ||
608 | static int configure_clock(struct snd_soc_codec *codec) | 608 | static int configure_clock(struct snd_soc_codec *codec) |
609 | { | 609 | { |
610 | struct wm9081_priv *wm9081 = codec->private_data; | 610 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); |
611 | int new_sysclk, i, target; | 611 | int new_sysclk, i, target; |
612 | unsigned int reg; | 612 | unsigned int reg; |
613 | int ret = 0; | 613 | int ret = 0; |
@@ -702,7 +702,7 @@ static int clk_sys_event(struct snd_soc_dapm_widget *w, | |||
702 | struct snd_kcontrol *kcontrol, int event) | 702 | struct snd_kcontrol *kcontrol, int event) |
703 | { | 703 | { |
704 | struct snd_soc_codec *codec = w->codec; | 704 | struct snd_soc_codec *codec = w->codec; |
705 | struct wm9081_priv *wm9081 = codec->private_data; | 705 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); |
706 | 706 | ||
707 | /* This should be done on init() for bypass paths */ | 707 | /* This should be done on init() for bypass paths */ |
708 | switch (wm9081->sysclk_source) { | 708 | switch (wm9081->sysclk_source) { |
@@ -873,7 +873,7 @@ static int wm9081_set_dai_fmt(struct snd_soc_dai *dai, | |||
873 | unsigned int fmt) | 873 | unsigned int fmt) |
874 | { | 874 | { |
875 | struct snd_soc_codec *codec = dai->codec; | 875 | struct snd_soc_codec *codec = dai->codec; |
876 | struct wm9081_priv *wm9081 = codec->private_data; | 876 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); |
877 | unsigned int aif2 = snd_soc_read(codec, WM9081_AUDIO_INTERFACE_2); | 877 | unsigned int aif2 = snd_soc_read(codec, WM9081_AUDIO_INTERFACE_2); |
878 | 878 | ||
879 | aif2 &= ~(WM9081_AIF_BCLK_INV | WM9081_AIF_LRCLK_INV | | 879 | aif2 &= ~(WM9081_AIF_BCLK_INV | WM9081_AIF_LRCLK_INV | |
@@ -965,7 +965,7 @@ static int wm9081_hw_params(struct snd_pcm_substream *substream, | |||
965 | struct snd_soc_dai *dai) | 965 | struct snd_soc_dai *dai) |
966 | { | 966 | { |
967 | struct snd_soc_codec *codec = dai->codec; | 967 | struct snd_soc_codec *codec = dai->codec; |
968 | struct wm9081_priv *wm9081 = codec->private_data; | 968 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); |
969 | int ret, i, best, best_val, cur_val; | 969 | int ret, i, best, best_val, cur_val; |
970 | unsigned int clk_ctrl2, aif1, aif2, aif3, aif4; | 970 | unsigned int clk_ctrl2, aif1, aif2, aif3, aif4; |
971 | 971 | ||
@@ -1139,7 +1139,7 @@ static int wm9081_set_sysclk(struct snd_soc_dai *codec_dai, | |||
1139 | int clk_id, unsigned int freq, int dir) | 1139 | int clk_id, unsigned int freq, int dir) |
1140 | { | 1140 | { |
1141 | struct snd_soc_codec *codec = codec_dai->codec; | 1141 | struct snd_soc_codec *codec = codec_dai->codec; |
1142 | struct wm9081_priv *wm9081 = codec->private_data; | 1142 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); |
1143 | 1143 | ||
1144 | switch (clk_id) { | 1144 | switch (clk_id) { |
1145 | case WM9081_SYSCLK_MCLK: | 1145 | case WM9081_SYSCLK_MCLK: |
@@ -1159,7 +1159,7 @@ static int wm9081_set_tdm_slot(struct snd_soc_dai *dai, | |||
1159 | unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width) | 1159 | unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width) |
1160 | { | 1160 | { |
1161 | struct snd_soc_codec *codec = dai->codec; | 1161 | struct snd_soc_codec *codec = dai->codec; |
1162 | struct wm9081_priv *wm9081 = codec->private_data; | 1162 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); |
1163 | unsigned int aif1 = snd_soc_read(codec, WM9081_AUDIO_INTERFACE_1); | 1163 | unsigned int aif1 = snd_soc_read(codec, WM9081_AUDIO_INTERFACE_1); |
1164 | 1164 | ||
1165 | aif1 &= ~(WM9081_AIFDAC_TDM_SLOT_MASK | WM9081_AIFDAC_TDM_MODE_MASK); | 1165 | aif1 &= ~(WM9081_AIFDAC_TDM_SLOT_MASK | WM9081_AIFDAC_TDM_MODE_MASK); |
@@ -1242,7 +1242,7 @@ static int wm9081_probe(struct platform_device *pdev) | |||
1242 | 1242 | ||
1243 | socdev->card->codec = wm9081_codec; | 1243 | socdev->card->codec = wm9081_codec; |
1244 | codec = wm9081_codec; | 1244 | codec = wm9081_codec; |
1245 | wm9081 = codec->private_data; | 1245 | wm9081 = snd_soc_codec_get_drvdata(codec); |
1246 | 1246 | ||
1247 | /* register pcms */ | 1247 | /* register pcms */ |
1248 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 1248 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
@@ -1339,7 +1339,7 @@ static int wm9081_register(struct wm9081_priv *wm9081, | |||
1339 | INIT_LIST_HEAD(&codec->dapm_widgets); | 1339 | INIT_LIST_HEAD(&codec->dapm_widgets); |
1340 | INIT_LIST_HEAD(&codec->dapm_paths); | 1340 | INIT_LIST_HEAD(&codec->dapm_paths); |
1341 | 1341 | ||
1342 | codec->private_data = wm9081; | 1342 | snd_soc_codec_set_drvdata(codec, wm9081); |
1343 | codec->name = "WM9081"; | 1343 | codec->name = "WM9081"; |
1344 | codec->owner = THIS_MODULE; | 1344 | codec->owner = THIS_MODULE; |
1345 | codec->dai = &wm9081_dai; | 1345 | codec->dai = &wm9081_dai; |