]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3121a7e9d91c0d0916c84ebbc94f8af2d440e2a9
treeea76de449bc5f6d84b6c8284d4deb6257237c59b
parenta1970eda3d41632628a28d3f063497f1fc3466ae
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 518ed3228cf4 "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