diff options
Diffstat (limited to 'sound/soc/codecs/sta350.c')
| -rw-r--r-- | sound/soc/codecs/sta350.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c index d05f3fd57661..71af82b099c0 100644 --- a/sound/soc/codecs/sta350.c +++ b/sound/soc/codecs/sta350.c @@ -22,8 +22,7 @@ #include <linux/delay.h> #include <linux/pm.h> #include <linux/i2c.h> -#include <linux/of_device.h> -#include <linux/of_gpio.h> +#include <linux/of.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> #include <linux/gpio/consumer.h> @@ -302,7 +301,7 @@ static int sta350_coefficient_info(struct snd_kcontrol *kcontrol, static int sta350_coefficient_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component); int numcoef = kcontrol->private_value >> 16; int index = kcontrol->private_value & 0xffff; @@ -344,7 +343,7 @@ exit_unlock: static int sta350_coefficient_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component); int numcoef = kcontrol->private_value >> 16; int index = kcontrol->private_value & 0xffff; @@ -831,6 +830,7 @@ static int sta350_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); int ret; dev_dbg(component->dev, "level = %d\n", level); @@ -846,7 +846,7 @@ static int sta350_set_bias_level(struct snd_soc_component *component, break; case SND_SOC_BIAS_STANDBY: - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { ret = regulator_bulk_enable( ARRAY_SIZE(sta350->supplies), sta350->supplies); @@ -906,6 +906,7 @@ static struct snd_soc_dai_driver sta350_dai = { static int sta350_probe(struct snd_soc_component *component) { + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component); struct sta350_platform_data *pdata = sta350->pdata; int i, ret = 0, thermal = 0; @@ -1029,7 +1030,7 @@ static int sta350_probe(struct snd_soc_component *component) sta350->coef_shadow[60] = 0x400000; sta350->coef_shadow[61] = 0x400000; - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY); /* Bias level configuration will have done an extra enable */ regulator_bulk_disable(ARRAY_SIZE(sta350->supplies), sta350->supplies); @@ -1065,7 +1066,7 @@ static const struct regmap_config sta350_regmap = { .max_register = STA350_MISC2, .reg_defaults = sta350_regs, .num_reg_defaults = ARRAY_SIZE(sta350_regs), - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .wr_table = &sta350_write_regs, .rd_table = &sta350_read_regs, .volatile_table = &sta350_volatile_regs, @@ -1239,7 +1240,7 @@ static void sta350_i2c_remove(struct i2c_client *client) {} static const struct i2c_device_id sta350_i2c_id[] = { - { "sta350", 0 }, + { "sta350" }, { } }; MODULE_DEVICE_TABLE(i2c, sta350_i2c_id); |
