Commit 7960546c authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Andrew Morton

rapidio/tsi721: replace flush_scheduled_work() with flush_work()

Like commit c4f135d6 ("workqueue: Wrap flush_workqueue() using a
macro") says, flush_scheduled_work() is dangerous and will be forbidden. 
We are on the way for removing all flush_scheduled_work() callers from the
kernel, and this patch is for removing flush_scheduled_work() call from
tsi721 driver.

Since "struct tsi721_device" is per a device struct, I assume that
tsi721_remove() needs to wait for only two works associated with that
device.  Therefore, wait for only these works using flush_work().

Link: https://lkml.kernel.org/r/0e8a2023-7526-f03a-f520-efafbb0ef45c@I-love.SAKURA.ne.jpSigned-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 6fe888c4
...@@ -2941,7 +2941,8 @@ static void tsi721_remove(struct pci_dev *pdev) ...@@ -2941,7 +2941,8 @@ static void tsi721_remove(struct pci_dev *pdev)
tsi721_disable_ints(priv); tsi721_disable_ints(priv);
tsi721_free_irq(priv); tsi721_free_irq(priv);
flush_scheduled_work(); flush_work(&priv->idb_work);
flush_work(&priv->pw_work);
rio_unregister_mport(&priv->mport); rio_unregister_mport(&priv->mport);
tsi721_unregister_dma(priv); tsi721_unregister_dma(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment