ALSA: hda: tas2781: Component should be unbound before deconstruction

[ Upstream commit d832b5a03e94a2a9f866dab3d04937a0f84ea116 ]

The interface associated with the hda_component should be deactivated
before the driver is deconstructed during removal.

Fixes: 4e7914eb1dae ("ALSA: hda/tas2781: remove sound controls in unbind")
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240613133713.75550-4-simont@opensource.cirrus.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Simon Trimmer 2024-06-13 14:37:13 +01:00 committed by Greg Kroah-Hartman
parent 8be82acd4e
commit 5a24f876b5
1 changed files with 2 additions and 2 deletions

View File

@ -683,11 +683,11 @@ static void tas2781_hda_remove(struct device *dev)
{
struct tas2781_hda *tas_hda = dev_get_drvdata(dev);
component_del(tas_hda->dev, &tas2781_hda_comp_ops);
pm_runtime_get_sync(tas_hda->dev);
pm_runtime_disable(tas_hda->dev);
component_del(tas_hda->dev, &tas2781_hda_comp_ops);
pm_runtime_put_noidle(tas_hda->dev);
tasdevice_remove(tas_hda->priv);