ALSA: pcsp: Replace tasklet with work
authorTakashi Iwai <tiwai@suse.de>
Thu, 3 Sep 2020 10:41:21 +0000 (12:41 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 9 Sep 2020 16:32:37 +0000 (18:32 +0200)
commit68f86a905e2c1d7a6d5d0bcc57f4e44ae204c171
treeea76de449bc5f6d84b6c8284d4deb6257237c59b
parent9ddb236f13594b34a12dacf69a5adca7a1aef35e
ALSA: pcsp: Replace tasklet with work

The tasklet is an old API that should be deprecated, usually can be
converted to another decent API.  This patch replaces the usage of
tasklet in pcsp driver with a simple work.  In pcsp driver, a global
tasklet is used for offloading the period-elapse handling in the
hrtimer callback (introduced in commit 96c7d478efad "ALSA: pcsp - Fix
locking messes in snd-pcsp").  It can be achieved gracefully with a
work queued in the high-prio system workqueue.

This also changes tasklet_kill() with cancel_work_sync() in the
sync_stop callback, which is anyway better to assure canceling the
pending tasks.

Link: https://lore.kernel.org/r/20200903104131.21097-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/pcsp/pcsp_lib.c