diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-12-02 05:12:28 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-12-02 07:23:40 -0500 |
commit | 88d071fc9a93de2916822910c927f28ed15c3a56 (patch) | |
tree | dbc30951524af2e66e8aef7c0e7c0d92113f33b6 /sound | |
parent | 1cd9b2f78bf29d5282e02b32f9b3ecebc5842a7c (diff) |
ALSA: hda - Fix complete_all() timing in deferred probes
When the probe of snd-hda-intel driver is deferred due to f/w loading
or the nested module loading, complete_all() should be also delayed
until the initialization really finished. Otherwise, vga-switcheroo
client would start switching before the actual init is done.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index c6d230193da6..27aa14007cbd 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -3876,7 +3876,8 @@ static int azx_probe(struct pci_dev *pci, | |||
3876 | } | 3876 | } |
3877 | 3877 | ||
3878 | dev++; | 3878 | dev++; |
3879 | complete_all(&chip->probe_wait); | 3879 | if (chip->disabled) |
3880 | complete_all(&chip->probe_wait); | ||
3880 | return 0; | 3881 | return 0; |
3881 | 3882 | ||
3882 | out_free: | 3883 | out_free: |
@@ -3953,10 +3954,10 @@ static int azx_probe_continue(struct azx *chip) | |||
3953 | if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || chip->use_vga_switcheroo) | 3954 | if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || chip->use_vga_switcheroo) |
3954 | pm_runtime_put_noidle(&pci->dev); | 3955 | pm_runtime_put_noidle(&pci->dev); |
3955 | 3956 | ||
3956 | return 0; | ||
3957 | |||
3958 | out_free: | 3957 | out_free: |
3959 | chip->init_failed = 1; | 3958 | if (err < 0) |
3959 | chip->init_failed = 1; | ||
3960 | complete_all(&chip->probe_wait); | ||
3960 | return err; | 3961 | return err; |
3961 | } | 3962 | } |
3962 | 3963 | ||