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

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: fsl_easrc: Fix control writes

Merge series from Mark Brown <broonie@kernel.org>:

I noticed that neither of the put() operations for the controls defined
by the fsl_easrc driver was flagging value changes properly, fix that.

+10 -4
+10 -4
sound/soc/fsl/fsl_easrc.c
··· 52 52 struct soc_mreg_control *mc = 53 53 (struct soc_mreg_control *)kcontrol->private_value; 54 54 unsigned int regval = ucontrol->value.integer.value[0]; 55 + int ret; 56 + 57 + ret = (easrc_priv->bps_iec958[mc->regbase] != regval); 55 58 56 59 easrc_priv->bps_iec958[mc->regbase] = regval; 57 60 58 - return 0; 61 + return ret; 59 62 } 60 63 61 64 static int fsl_easrc_iec958_get_bits(struct snd_kcontrol *kcontrol, ··· 96 93 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 97 94 struct soc_mreg_control *mc = 98 95 (struct soc_mreg_control *)kcontrol->private_value; 96 + struct fsl_asrc *easrc = snd_soc_component_get_drvdata(component); 99 97 unsigned int regval = ucontrol->value.integer.value[0]; 98 + bool changed; 100 99 int ret; 101 100 102 - ret = snd_soc_component_write(component, mc->regbase, regval); 103 - if (ret < 0) 101 + ret = regmap_update_bits_check(easrc->regmap, mc->regbase, 102 + GENMASK(31, 0), regval, &changed); 103 + if (ret != 0) 104 104 return ret; 105 105 106 - return 0; 106 + return changed; 107 107 } 108 108 109 109 #define SOC_SINGLE_REG_RW(xname, xreg) \