mtd: don't use flush_scheduled_work()
authorTejun Heo <tj@kernel.org>
Sat, 11 Dec 2010 16:51:44 +0000 (17:51 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 6 Jan 2011 15:17:08 +0000 (15:17 +0000)
flush_scheduled_work() is deprecated and scheduled to be removed.
Directly flush cxt->work_{erase|write} on removal instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdoops.c

index 1ee72f3..8b10273 100644 (file)
@@ -396,7 +396,8 @@ static void mtdoops_notify_remove(struct mtd_info *mtd)
                printk(KERN_WARNING "mtdoops: could not unregister kmsg_dumper\n");
 
        cxt->mtd = NULL;
-       flush_scheduled_work();
+       flush_work_sync(&cxt->work_erase);
+       flush_work_sync(&cxt->work_write);
 }