diff options
Diffstat (limited to 'drivers/mtd/ubi/debug.h')
-rw-r--r-- | drivers/mtd/ubi/debug.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h index 33f8f3b2c9b2..cba89fcd1587 100644 --- a/drivers/mtd/ubi/debug.h +++ b/drivers/mtd/ubi/debug.h | |||
@@ -86,7 +86,7 @@ static inline int ubi_dbg_is_bgt_disabled(const struct ubi_device *ubi) | |||
86 | static inline int ubi_dbg_is_bitflip(const struct ubi_device *ubi) | 86 | static inline int ubi_dbg_is_bitflip(const struct ubi_device *ubi) |
87 | { | 87 | { |
88 | if (ubi->dbg.emulate_bitflips) | 88 | if (ubi->dbg.emulate_bitflips) |
89 | return !(random32() % 200); | 89 | return !(prandom_u32() % 200); |
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | 92 | ||
@@ -100,7 +100,7 @@ static inline int ubi_dbg_is_bitflip(const struct ubi_device *ubi) | |||
100 | static inline int ubi_dbg_is_write_failure(const struct ubi_device *ubi) | 100 | static inline int ubi_dbg_is_write_failure(const struct ubi_device *ubi) |
101 | { | 101 | { |
102 | if (ubi->dbg.emulate_io_failures) | 102 | if (ubi->dbg.emulate_io_failures) |
103 | return !(random32() % 500); | 103 | return !(prandom_u32() % 500); |
104 | return 0; | 104 | return 0; |
105 | } | 105 | } |
106 | 106 | ||
@@ -114,7 +114,7 @@ static inline int ubi_dbg_is_write_failure(const struct ubi_device *ubi) | |||
114 | static inline int ubi_dbg_is_erase_failure(const struct ubi_device *ubi) | 114 | static inline int ubi_dbg_is_erase_failure(const struct ubi_device *ubi) |
115 | { | 115 | { |
116 | if (ubi->dbg.emulate_io_failures) | 116 | if (ubi->dbg.emulate_io_failures) |
117 | return !(random32() % 400); | 117 | return !(prandom_u32() % 400); |
118 | return 0; | 118 | return 0; |
119 | } | 119 | } |
120 | 120 | ||