summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
authorKevin Cernekee <kpc.mtd@gmail.com>2009-06-09 10:59:19 -0700
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-06-10 16:50:50 +0300
commitd9dd0887cc5c6df0dbbe5a307284610607eea7ab (patch)
tree1b6dc1bf5e90c6cd49896196abda9369a50ab3b2 /drivers/mtd/ubi/ubi.h
parent6b5c94c6b4e1630a8e1ee7d30383d9396603749f (diff)
downloadblackbird-op-linux-d9dd0887cc5c6df0dbbe5a307284610607eea7ab.tar.gz
blackbird-op-linux-d9dd0887cc5c6df0dbbe5a307284610607eea7ab.zip
UBI: add reboot notifier
Terminate the UBI background thread prior to restarting the system. [Artem: amended comments a little] Signed-off-by: Kevin Cernekee <kpc.mtd@gmail.com> Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r--drivers/mtd/ubi/ubi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 70ce48b95b64..28acd133c997 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -36,9 +36,9 @@
#include <linux/device.h>
#include <linux/string.h>
#include <linux/vmalloc.h>
+#include <linux/notifier.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/ubi.h>
-#include <linux/notifier.h>
#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;
OpenPOWER on IntegriCloud