Commit 18073733247dc0c31e07f3a87f3267fe8d7e7022
1 parent
27a0f2a37a
Exists in
master
and in
38 other branches
UBI: make it possible to use struct ubi_device in debug.h
Current layout does not allow us to add inline functions to debug.h which use the 'struct ubi_device' object, because it is undefined there. Move '#include "debug.h"' in "ubi.h" down so to make 'struct ubi_device" be defined. Additionally, this makes it possible to remove a bunch of forward declarations in "debug.h". This is a preparation to the next patch. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Showing 2 changed files with 2 additions and 9 deletions Side-by-side Diff
drivers/mtd/ubi/debug.h
... | ... | @@ -21,14 +21,6 @@ |
21 | 21 | #ifndef __UBI_DEBUG_H__ |
22 | 22 | #define __UBI_DEBUG_H__ |
23 | 23 | |
24 | -struct ubi_ec_hdr; | |
25 | -struct ubi_vid_hdr; | |
26 | -struct ubi_volume; | |
27 | -struct ubi_vtbl_record; | |
28 | -struct ubi_scan_volume; | |
29 | -struct ubi_scan_leb; | |
30 | -struct ubi_mkvol_req; | |
31 | - | |
32 | 24 | #ifdef CONFIG_MTD_UBI_DEBUG |
33 | 25 | #include <linux/random.h> |
34 | 26 |
drivers/mtd/ubi/ubi.h
... | ... | @@ -44,7 +44,6 @@ |
44 | 44 | |
45 | 45 | #include "ubi-media.h" |
46 | 46 | #include "scan.h" |
47 | -#include "debug.h" | |
48 | 47 | |
49 | 48 | /* Maximum number of supported UBI devices */ |
50 | 49 | #define UBI_MAX_DEVICES 32 |
... | ... | @@ -477,6 +476,8 @@ |
477 | 476 | |
478 | 477 | struct ubi_debug_info *dbg; |
479 | 478 | }; |
479 | + | |
480 | +#include "debug.h" | |
480 | 481 | |
481 | 482 | extern struct kmem_cache *ubi_wl_entry_slab; |
482 | 483 | extern const struct file_operations ubi_ctrl_cdev_operations; |