From d9dd0887cc5c6df0dbbe5a307284610607eea7ab Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Tue, 9 Jun 2009 10:59:19 -0700 Subject: UBI: add reboot notifier Terminate the UBI background thread prior to restarting the system. [Artem: amended comments a little] Signed-off-by: Kevin Cernekee Tested-by: Artem Bityutskiy Signed-off-by: Artem Bityutskiy --- drivers/mtd/ubi/ubi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/mtd/ubi/ubi.h') diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 70ce48b..28acd13 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h @@ -36,9 +36,9 @@ #include #include #include +#include #include #include -#include #include "ubi-media.h" #include "scan.h" @@ -348,6 +348,7 @@ struct ubi_wl_entry; * @bgt_thread: background thread description object * @thread_enabled: if the background thread is enabled * @bgt_name: background thread name + * @reboot_notifier: notifier to terminate background thread before rebooting * * @flash_size: underlying MTD device size (in bytes) * @peb_count: count of physical eraseblocks on the MTD device @@ -431,6 +432,7 @@ struct ubi_device { struct task_struct *bgt_thread; int thread_enabled; char bgt_name[sizeof(UBI_BGT_NAME_PATTERN)+2]; + struct notifier_block reboot_notifier; /* I/O sub-system's stuff */ long long flash_size; -- cgit v1.1