diff options
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 320fc38fa2a1..f80ffaba9058 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -50,13 +50,14 @@ | |||
50 | #define UBI_NAME_STR "ubi" | 50 | #define UBI_NAME_STR "ubi" |
51 | 51 | ||
52 | /* Normal UBI messages */ | 52 | /* Normal UBI messages */ |
53 | #define ubi_msg(fmt, ...) pr_notice("UBI: " fmt "\n", ##__VA_ARGS__) | 53 | #define ubi_msg(ubi, fmt, ...) pr_notice("UBI-%d: %s:" fmt "\n", \ |
54 | ubi->ubi_num, __func__, ##__VA_ARGS__) | ||
54 | /* UBI warning messages */ | 55 | /* UBI warning messages */ |
55 | #define ubi_warn(fmt, ...) pr_warn("UBI warning: %s: " fmt "\n", \ | 56 | #define ubi_warn(ubi, fmt, ...) pr_warn("UBI-%d warning: %s: " fmt "\n", \ |
56 | __func__, ##__VA_ARGS__) | 57 | ubi->ubi_num, __func__, ##__VA_ARGS__) |
57 | /* UBI error messages */ | 58 | /* UBI error messages */ |
58 | #define ubi_err(fmt, ...) pr_err("UBI error: %s: " fmt "\n", \ | 59 | #define ubi_err(ubi, fmt, ...) pr_err("UBI-%d error: %s: " fmt "\n", \ |
59 | __func__, ##__VA_ARGS__) | 60 | ubi->ubi_num, __func__, ##__VA_ARGS__) |
60 | 61 | ||
61 | /* Background thread name pattern */ | 62 | /* Background thread name pattern */ |
62 | #define UBI_BGT_NAME_PATTERN "ubi_bgt%dd" | 63 | #define UBI_BGT_NAME_PATTERN "ubi_bgt%dd" |
@@ -987,7 +988,7 @@ static inline void ubi_ro_mode(struct ubi_device *ubi) | |||
987 | { | 988 | { |
988 | if (!ubi->ro_mode) { | 989 | if (!ubi->ro_mode) { |
989 | ubi->ro_mode = 1; | 990 | ubi->ro_mode = 1; |
990 | ubi_warn("switch to read-only mode"); | 991 | ubi_warn(ubi, "switch to read-only mode"); |
991 | dump_stack(); | 992 | dump_stack(); |
992 | } | 993 | } |
993 | } | 994 | } |