diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-11-02 18:38:39 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-11-15 08:21:19 +0100 |
commit | aeaa6203b6c41d9add8932dbd95bc741839054d0 (patch) | |
tree | 85e5964317663025c33f59b83754dc2958ef35e6 /include/sound/emu10k1.h | |
parent | 4e4dfe4c3fb2888bd96eed629220bd2e7f105f60 (diff) | |
download | linux-aeaa6203b6c41d9add8932dbd95bc741839054d0.tar.gz linux-aeaa6203b6c41d9add8932dbd95bc741839054d0.tar.bz2 linux-aeaa6203b6c41d9add8932dbd95bc741839054d0.zip |
ALSA: emu10k1: Use workqueue instead of kthread for emu1010 fw polling
This patch is a cleanup of EMU1010 dock probing code in emu10k1 driver
to use work instead of kthread in a loop. The work is lighter and
easier to control than kthread, in general.
Instead of a loop with the explicit sleep, we do simply
delayed-schedule the work. At suspend/resume callbacks, the work is
canceled and restarted, respectively.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/emu10k1.h')
-rw-r--r-- | include/sound/emu10k1.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 5bd134651f5e..4f42affe777c 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -1688,7 +1688,8 @@ struct snd_emu1010 { unsigned int internal_clock; /* 44100 or 48000 */ unsigned int optical_in; /* 0:SPDIF, 1:ADAT */ unsigned int optical_out; /* 0:SPDIF, 1:ADAT */ - struct task_struct *firmware_thread; + struct delayed_work firmware_work; + u32 last_reg; }; struct snd_emu10k1 { |