diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-07-03 14:35:12 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-07-05 12:01:06 +0200 |
commit | 774a075ab5140bb4504e6026bf327021926c3e65 (patch) | |
tree | f1d8252e2adc8f0f6ca3bb142f5b612699f8cc7e /sound/pci | |
parent | 3450121997ce872eb7f1248417225827ea249710 (diff) | |
download | linux-774a075ab5140bb4504e6026bf327021926c3e65.tar.bz2 |
ALSA: hda: Simplify snd_hdac_refresh_widgets()
Along with the recent fix for the races of snd_hdac_refresh_widgets()
it turned out that the instantiation of widgets sysfs at
snd_hdac_sysfs_reinit() could cause a race. The race itself was
already covered later by extending the mutex protection range, the
commit 98482377dc72 ("ALSA: hda: Fix widget_mutex incomplete
protection"), but this also indicated that the call of *_reinit() is
basically superfluous, as the widgets shall be created sooner or later
from snd_hdac_device_register().
This patch removes the redundant call of snd_hdac_sysfs_reinit() at
first. By this removal, the sysfs argument itself in
snd_hdac_refresh_widgets() becomes superfluous, too, because the only
case sysfs=false is always with codec->widgets=NULL. So, we drop this
redundant argument as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index fcdf2cd3783b..d1a0e0de80ac 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1016,7 +1016,7 @@ int snd_hda_codec_update_widgets(struct hda_codec *codec) hda_nid_t fg; int err; - err = snd_hdac_refresh_widgets(&codec->core, true); + err = snd_hdac_refresh_widgets(&codec->core); if (err < 0) return err; |