Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: codecs: max98095: convert to snd_soc_dapm_xxx()

This patch converts below functions.

dapm->dev -> snd_soc_dapm_to_dev()
dapm->card -> snd_soc_dapm_to_card()
dapm->component -> snd_soc_dapm_to_component()

dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value()

snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin()
snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked()
snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin()
snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked()
snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin()
snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked()
snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status()
snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin()
snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked()
snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level()
snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level()
snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level()
snd_soc_component_get_dapm() -> snd_soc_component_to_dapm()

snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component()
snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/87346l5sed.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
2e20be4b 6ef8e2f7

+7 -4
+7 -4
sound/soc/codecs/max98095.c
··· 1359 1359 enum snd_soc_bias_level level) 1360 1360 { 1361 1361 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 1362 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 1362 1363 int ret; 1363 1364 1364 1365 switch (level) { ··· 1377 1376 if (IS_ERR(max98095->mclk)) 1378 1377 break; 1379 1378 1380 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_ON) { 1379 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_ON) { 1381 1380 clk_disable_unprepare(max98095->mclk); 1382 1381 } else { 1383 1382 ret = clk_prepare_enable(max98095->mclk); ··· 1387 1386 break; 1388 1387 1389 1388 case SND_SOC_BIAS_STANDBY: 1390 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { 1389 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { 1391 1390 ret = regcache_sync(max98095->regmap); 1392 1391 1393 1392 if (ret != 0) { ··· 1918 1917 static int max98095_suspend(struct snd_soc_component *component) 1919 1918 { 1920 1919 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 1920 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 1921 1921 1922 1922 if (max98095->headphone_jack || max98095->mic_jack) 1923 1923 max98095_jack_detect_disable(component); 1924 1924 1925 - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); 1925 + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF); 1926 1926 1927 1927 return 0; 1928 1928 } ··· 1932 1930 { 1933 1931 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 1934 1932 struct i2c_client *client = to_i2c_client(component->dev); 1933 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 1935 1934 1936 - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); 1935 + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY); 1937 1936 1938 1937 if (max98095->headphone_jack || max98095->mic_jack) { 1939 1938 max98095_jack_detect_enable(component);