|
89 | 89 | #include <linux/crc32.h>
|
90 | 90 | #include <linux/freezer.h>
|
91 | 91 | #include <linux/kthread.h>
|
92 |
| -#include <linux/reboot.h> |
93 | 92 | #include "ubi.h"
|
94 | 93 | #include "wl.h"
|
95 | 94 |
|
@@ -128,8 +127,6 @@ static int self_check_in_wl_tree(const struct ubi_device *ubi,
|
128 | 127 | struct ubi_wl_entry *e, struct rb_root *root);
|
129 | 128 | static int self_check_in_pq(const struct ubi_device *ubi,
|
130 | 129 | struct ubi_wl_entry *e);
|
131 |
| -static int ubi_wl_reboot_notifier(struct notifier_block *n, |
132 |
| - unsigned long state, void *cmd); |
133 | 130 |
|
134 | 131 | /**
|
135 | 132 | * wl_tree_add - add a wear-leveling entry to a WL RB-tree.
|
@@ -1953,13 +1950,6 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)
|
1953 | 1950 | if (!ubi->ro_mode && !ubi->fm_disabled)
|
1954 | 1951 | ubi_ensure_anchor_pebs(ubi);
|
1955 | 1952 | #endif
|
1956 |
| - |
1957 |
| - if (!ubi->wl_reboot_notifier.notifier_call) { |
1958 |
| - ubi->wl_reboot_notifier.notifier_call = ubi_wl_reboot_notifier; |
1959 |
| - ubi->wl_reboot_notifier.priority = 1; /* Higher than MTD */ |
1960 |
| - register_reboot_notifier(&ubi->wl_reboot_notifier); |
1961 |
| - } |
1962 |
| - |
1963 | 1953 | return 0;
|
1964 | 1954 |
|
1965 | 1955 | out_free:
|
@@ -2005,17 +1995,6 @@ void ubi_wl_close(struct ubi_device *ubi)
|
2005 | 1995 | kfree(ubi->lookuptbl);
|
2006 | 1996 | }
|
2007 | 1997 |
|
2008 |
| -static int ubi_wl_reboot_notifier(struct notifier_block *n, |
2009 |
| - unsigned long state, void *cmd) |
2010 |
| -{ |
2011 |
| - struct ubi_device *ubi; |
2012 |
| - |
2013 |
| - ubi = container_of(n, struct ubi_device, wl_reboot_notifier); |
2014 |
| - ubi_wl_close(ubi); |
2015 |
| - |
2016 |
| - return NOTIFY_DONE; |
2017 |
| -} |
2018 |
| - |
2019 | 1998 | /**
|
2020 | 1999 | * self_check_ec - make sure that the erase counter of a PEB is correct.
|
2021 | 2000 | * @ubi: UBI device description object
|
|
0 commit comments