Skip to content
Commit 774a075a authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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 98482377 ("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: default avatarTakashi Iwai <tiwai@suse.de>
parent 34501219
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment