Skip to content

Commit

Permalink
ASoC: rt71*-sdw: fix component remove
Browse files Browse the repository at this point in the history
For some reason, the rt711.c and rt711-sdca.c play with the regcache
status on a component remove.

This is a layering violation, the regcache status should only happen
on device probe, suspend and resume.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
  • Loading branch information
plbossart committed May 12, 2022
1 parent 861d91f commit 21c126a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
9 changes: 0 additions & 9 deletions sound/soc/codecs/rt711-sdca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,14 +1195,6 @@ static int rt711_sdca_probe(struct snd_soc_component *component)
return 0;
}

static void rt711_sdca_remove(struct snd_soc_component *component)
{
struct rt711_sdca_priv *rt711 = snd_soc_component_get_drvdata(component);

regcache_cache_only(rt711->regmap, true);
regcache_cache_only(rt711->mbq_regmap, true);
}

static const struct snd_soc_component_driver soc_sdca_dev_rt711 = {
.probe = rt711_sdca_probe,
.controls = rt711_sdca_snd_controls,
Expand All @@ -1212,7 +1204,6 @@ static const struct snd_soc_component_driver soc_sdca_dev_rt711 = {
.dapm_routes = rt711_sdca_audio_map,
.num_dapm_routes = ARRAY_SIZE(rt711_sdca_audio_map),
.set_jack = rt711_sdca_set_jack_detect,
.remove = rt711_sdca_remove,
};

static int rt711_sdca_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
Expand Down
8 changes: 0 additions & 8 deletions sound/soc/codecs/rt711.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,13 +936,6 @@ static int rt711_probe(struct snd_soc_component *component)
return 0;
}

static void rt711_remove(struct snd_soc_component *component)
{
struct rt711_priv *rt711 = snd_soc_component_get_drvdata(component);

regcache_cache_only(rt711->regmap, true);
}

static const struct snd_soc_component_driver soc_codec_dev_rt711 = {
.probe = rt711_probe,
.set_bias_level = rt711_set_bias_level,
Expand All @@ -953,7 +946,6 @@ static const struct snd_soc_component_driver soc_codec_dev_rt711 = {
.dapm_routes = rt711_audio_map,
.num_dapm_routes = ARRAY_SIZE(rt711_audio_map),
.set_jack = rt711_set_jack_detect,
.remove = rt711_remove,
};

static int rt711_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
Expand Down

0 comments on commit 21c126a

Please sign in to comment.