From: Stanislaw Gruszka <sgruszka@redhat.com> Date: Wed, 14 Jul 2010 08:12:51 -0400 Subject: [misc] workqueue: add cancel_work_sync to include Message-id: <20100714081246.4740.99603.send-patch@dhcp-lab-109.englab.brq.redhat.com> Patchwork-id: 26875 O-Subject: [RHEL5 PATCH 1/7] workqueue: add cancel_work_sync to include Bugzilla: 582191 RH-Acked-by: Oleg Nesterov <oleg@redhat.com> RH-Acked-by: John Linville <linville@redhat.com> RH-Acked-by: Andy Gospodarek <gospo@redhat.com> RH-Acked-by: Jiri Pirko <jpirko@redhat.com> RH-Acked-by: Jarod Wilson <jarod@redhat.com> diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 7ea17c8..3deac40 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -114,6 +114,8 @@ static inline int delayed_work_pending(struct work_struct *work) return test_bit(0, &work->pending); } +extern int cancel_work_sync(struct work_struct *work); + /** * cancel_delayed_work_sync - reliably kill off a delayed work. * @dwork: the delayed work struct @@ -121,11 +123,6 @@ static inline int delayed_work_pending(struct work_struct *work) static inline int cancel_delayed_work_sync(struct delayed_work *dwork) { - int ret; - - ret = cancel_delayed_work(&dwork->work); - if (!ret) - flush_scheduled_work(); - return ret; + return cancel_work_sync(&dwork->work); } #endif diff --git a/sound/pci/hda/compat.c b/sound/pci/hda/compat.c index 39d9c6b..616958c 100644 --- a/sound/pci/hda/compat.c +++ b/sound/pci/hda/compat.c @@ -44,11 +44,6 @@ int snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream, return res; } -static inline -void cancel_work_sync(struct work_struct *work) -{ -} - /* Realtek codecs */ extern struct hda_codec_preset_list realtek_list[]; /* C-Media codecs */