projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ALSA: hda/tas2781: leave hda_component in usable state
[platform/kernel/linux-starfive.git]
/
sound
/
pci
/
hda
/
tas2781_hda_i2c.c
diff --git
a/sound/pci/hda/tas2781_hda_i2c.c
b/sound/pci/hda/tas2781_hda_i2c.c
index
fb80280
..
b428371
100644
(file)
--- a/
sound/pci/hda/tas2781_hda_i2c.c
+++ b/
sound/pci/hda/tas2781_hda_i2c.c
@@
-612,9
+612,13
@@
static void tas2781_hda_unbind(struct device *dev,
{
struct tasdevice_priv *tas_priv = dev_get_drvdata(dev);
struct hda_component *comps = master_data;
{
struct tasdevice_priv *tas_priv = dev_get_drvdata(dev);
struct hda_component *comps = master_data;
+ comps = &comps[tas_priv->index];
- if (comps[tas_priv->index].dev == dev)
- memset(&comps[tas_priv->index], 0, sizeof(*comps));
+ if (comps->dev == dev) {
+ comps->dev = NULL;
+ memset(comps->name, 0, sizeof(comps->name));
+ comps->playback_hook = NULL;
+ }
tasdevice_config_info_remove(tas_priv);
tasdevice_dsp_remove(tas_priv);
tasdevice_config_info_remove(tas_priv);
tasdevice_dsp_remove(tas_priv);