Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43829731 authored by Tejun Heo's avatar Tejun Heo
Browse files

workqueue: deprecate flush[_delayed]_work_sync()



flush[_delayed]_work_sync() are now spurious.  Mark them deprecated
and convert all users to flush[_delayed]_work().

If you're cc'd and wondering what's going on: Now all workqueues are
non-reentrant and the regular flushes guarantee that the work item is
not pending or running on any CPU on return, so there's no reason to
use the sync flushes at all and they're going away.

This patch doesn't make any functional difference.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Mattia Dongili <malattia@linux.it>
Cc: Kent Yoder <key@linux.vnet.ibm.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Petr Vandrovec <petr@vandrovec.name>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Avi Kivity <avi@redhat.com> 
parent ae930e0f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -579,8 +579,8 @@ static int sharpsl_ac_check(void)
static int sharpsl_pm_suspend(struct platform_device *pdev, pm_message_t state)
{
	sharpsl_pm.flags |= SHARPSL_SUSPENDED;
	flush_delayed_work_sync(&toggle_charger);
	flush_delayed_work_sync(&sharpsl_bat);
	flush_delayed_work(&toggle_charger);
	flush_delayed_work(&sharpsl_bat);

	if (sharpsl_pm.charge_mode == CHRG_ON)
		sharpsl_pm.flags |= SHARPSL_DO_OFFLINE_CHRG;
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
		omap_mbox_disable_irq(mbox, IRQ_RX);
		free_irq(mbox->irq, mbox);
		tasklet_kill(&mbox->txq->tasklet);
		flush_work_sync(&mbox->rxq->work);
		flush_work(&mbox->rxq->work);
		mbox_queue_free(mbox->txq);
		mbox_queue_free(mbox->rxq);
	}
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ static int switch_drv_remove(struct platform_device *pdev)
		device_remove_file(&pdev->dev, &dev_attr_switch);

	platform_set_drvdata(pdev, NULL);
	flush_work_sync(&psw->work);
	flush_work(&psw->work);
	del_timer_sync(&psw->debounce);
	free_irq(irq, pdev);

+2 −2
Original line number Diff line number Diff line
@@ -670,7 +670,7 @@ static void xlvbd_release_gendisk(struct blkfront_info *info)
	spin_unlock_irqrestore(&info->io_lock, flags);

	/* Flush gnttab callback work. Must be done with no locks held. */
	flush_work_sync(&info->work);
	flush_work(&info->work);

	del_gendisk(info->gd);

@@ -719,7 +719,7 @@ static void blkif_free(struct blkfront_info *info, int suspend)
	spin_unlock_irq(&info->io_lock);

	/* Flush gnttab callback work. Must be done with no locks held. */
	flush_work_sync(&info->work);
	flush_work(&info->work);

	/* Free resources associated with old device channel. */
	if (info->ring_ref != GRANT_INVALID_REF) {
+1 −1
Original line number Diff line number Diff line
@@ -840,7 +840,7 @@ static int __devinit probe_gdrom(struct platform_device *devptr)

static int __devexit remove_gdrom(struct platform_device *devptr)
{
	flush_work_sync(&work);
	flush_work(&work);
	blk_cleanup_queue(gd.gdrom_rq);
	free_irq(HW_EVENT_GDROM_CMD, &gd);
	free_irq(HW_EVENT_GDROM_DMA, &gd);
Loading