mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
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: Tejun 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>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -840,7 +840,7 @@ probe_fail_no_mem:
|
||||
|
||||
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);
|
||||
|
||||
@@ -1433,7 +1433,7 @@ static int __devexit sonypi_remove(struct platform_device *dev)
|
||||
sonypi_disable();
|
||||
|
||||
synchronize_irq(sonypi_device.irq);
|
||||
flush_work_sync(&sonypi_device.input_work);
|
||||
flush_work(&sonypi_device.input_work);
|
||||
|
||||
if (useinput) {
|
||||
input_unregister_device(sonypi_device.input_key_dev);
|
||||
|
||||
@@ -1172,7 +1172,7 @@ int tpm_release(struct inode *inode, struct file *file)
|
||||
struct tpm_chip *chip = file->private_data;
|
||||
|
||||
del_singleshot_timer_sync(&chip->user_read_timer);
|
||||
flush_work_sync(&chip->work);
|
||||
flush_work(&chip->work);
|
||||
file->private_data = NULL;
|
||||
atomic_set(&chip->data_pending, 0);
|
||||
kfree(chip->data_buffer);
|
||||
@@ -1225,7 +1225,7 @@ ssize_t tpm_read(struct file *file, char __user *buf,
|
||||
int rc;
|
||||
|
||||
del_singleshot_timer_sync(&chip->user_read_timer);
|
||||
flush_work_sync(&chip->work);
|
||||
flush_work(&chip->work);
|
||||
ret_size = atomic_read(&chip->data_pending);
|
||||
atomic_set(&chip->data_pending, 0);
|
||||
if (ret_size > 0) { /* relay data */
|
||||
|
||||
@@ -908,7 +908,7 @@ static int g2d_suspend(struct device *dev)
|
||||
/* FIXME: good range? */
|
||||
usleep_range(500, 1000);
|
||||
|
||||
flush_work_sync(&g2d->runqueue_work);
|
||||
flush_work(&g2d->runqueue_work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ nouveau_gpio_isr_del(struct drm_device *dev, int idx, u8 tag, u8 line,
|
||||
spin_unlock_irqrestore(&pgpio->lock, flags);
|
||||
|
||||
list_for_each_entry_safe(isr, tmp, &tofree, head) {
|
||||
flush_work_sync(&isr->work);
|
||||
flush_work(&isr->work);
|
||||
kfree(isr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ void radeon_irq_kms_fini(struct radeon_device *rdev)
|
||||
if (rdev->msi_enabled)
|
||||
pci_disable_msi(rdev->pdev);
|
||||
}
|
||||
flush_work_sync(&rdev->hotplug_work);
|
||||
flush_work(&rdev->hotplug_work);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -594,7 +594,7 @@ int vmw_fb_off(struct vmw_private *vmw_priv)
|
||||
par->dirty.active = false;
|
||||
spin_unlock_irqrestore(&par->dirty.lock, flags);
|
||||
|
||||
flush_delayed_work_sync(&info->deferred_work);
|
||||
flush_delayed_work(&info->deferred_work);
|
||||
|
||||
par->bo_ptr = NULL;
|
||||
ttm_bo_kunmap(&par->map);
|
||||
|
||||
@@ -2737,7 +2737,7 @@ static void __exit picolcd_exit(void)
|
||||
{
|
||||
hid_unregister_driver(&picolcd_driver);
|
||||
#ifdef CONFIG_HID_PICOLCD_FB
|
||||
flush_work_sync(&picolcd_fb_cleanup);
|
||||
flush_work(&picolcd_fb_cleanup);
|
||||
WARN_ON(fb_pending);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ static void wm831x_ts_input_close(struct input_dev *idev)
|
||||
synchronize_irq(wm831x_ts->pd_irq);
|
||||
|
||||
/* Make sure the IRQ completion work is quiesced */
|
||||
flush_work_sync(&wm831x_ts->pd_data_work);
|
||||
flush_work(&wm831x_ts->pd_data_work);
|
||||
|
||||
/* If we ended up with the pen down then make sure we revert back
|
||||
* to pen detection state for the next time we start up.
|
||||
|
||||
@@ -116,7 +116,7 @@ mISDN_freedchannel(struct dchannel *ch)
|
||||
}
|
||||
skb_queue_purge(&ch->squeue);
|
||||
skb_queue_purge(&ch->rqueue);
|
||||
flush_work_sync(&ch->workq);
|
||||
flush_work(&ch->workq);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mISDN_freedchannel);
|
||||
@@ -157,7 +157,7 @@ mISDN_freebchannel(struct bchannel *ch)
|
||||
mISDN_clear_bchannel(ch);
|
||||
skb_queue_purge(&ch->rqueue);
|
||||
ch->rcount = 0;
|
||||
flush_work_sync(&ch->workq);
|
||||
flush_work(&ch->workq);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mISDN_freebchannel);
|
||||
|
||||
@@ -737,7 +737,7 @@ err_sysfs_remove:
|
||||
sysfs_remove_group(&led->cdev.dev->kobj, &lm3533_led_attribute_group);
|
||||
err_unregister:
|
||||
led_classdev_unregister(&led->cdev);
|
||||
flush_work_sync(&led->work);
|
||||
flush_work(&led->work);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -751,7 +751,7 @@ static int __devexit lm3533_led_remove(struct platform_device *pdev)
|
||||
lm3533_ctrlbank_disable(&led->cb);
|
||||
sysfs_remove_group(&led->cdev.dev->kobj, &lm3533_led_attribute_group);
|
||||
led_classdev_unregister(&led->cdev);
|
||||
flush_work_sync(&led->work);
|
||||
flush_work(&led->work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -765,7 +765,7 @@ static void lm3533_led_shutdown(struct platform_device *pdev)
|
||||
|
||||
lm3533_ctrlbank_disable(&led->cb);
|
||||
lm3533_led_set(&led->cdev, LED_OFF); /* disable blink */
|
||||
flush_work_sync(&led->work);
|
||||
flush_work(&led->work);
|
||||
}
|
||||
|
||||
static struct platform_driver lm3533_led_driver = {
|
||||
|
||||
@@ -172,7 +172,7 @@ static int __devexit lp8788_led_remove(struct platform_device *pdev)
|
||||
struct lp8788_led *led = platform_get_drvdata(pdev);
|
||||
|
||||
led_classdev_unregister(&led->led_dev);
|
||||
flush_work_sync(&led->work);
|
||||
flush_work(&led->work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ static int wm8350_led_remove(struct platform_device *pdev)
|
||||
struct wm8350_led *led = platform_get_drvdata(pdev);
|
||||
|
||||
led_classdev_unregister(&led->cdev);
|
||||
flush_work_sync(&led->work);
|
||||
flush_work(&led->work);
|
||||
wm8350_led_disable(led);
|
||||
regulator_put(led->dcdc);
|
||||
regulator_put(led->isink);
|
||||
|
||||
@@ -226,7 +226,7 @@ void ams_sensor_detach(void)
|
||||
* We do this after ams_info.exit(), because an interrupt might
|
||||
* have arrived before disabling them.
|
||||
*/
|
||||
flush_work_sync(&ams_info.worker);
|
||||
flush_work(&ams_info.worker);
|
||||
|
||||
/* Remove device */
|
||||
of_device_unregister(ams_info.of_dev);
|
||||
|
||||
@@ -944,7 +944,7 @@ static void flush_multipath_work(struct multipath *m)
|
||||
flush_workqueue(kmpath_handlerd);
|
||||
multipath_wait_for_pg_init_completion(m);
|
||||
flush_workqueue(kmultipathd);
|
||||
flush_work_sync(&m->trigger_event);
|
||||
flush_work(&m->trigger_event);
|
||||
}
|
||||
|
||||
static void multipath_dtr(struct dm_target *ti)
|
||||
|
||||
@@ -1146,7 +1146,7 @@ static void mirror_dtr(struct dm_target *ti)
|
||||
|
||||
del_timer_sync(&ms->timer);
|
||||
flush_workqueue(ms->kmirrord_wq);
|
||||
flush_work_sync(&ms->trigger_event);
|
||||
flush_work(&ms->trigger_event);
|
||||
dm_kcopyd_client_destroy(ms->kcopyd_client);
|
||||
destroy_workqueue(ms->kmirrord_wq);
|
||||
free_context(ms, ti, ms->nr_mirrors);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user