Skip to content

Commit 1807373

Browse files
Artem BityutskiyArtem Bityutskiy
authored andcommitted
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>
1 parent 27a0f2a commit 1807373

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

‎drivers/mtd/ubi/debug.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@
2121
#ifndef __UBI_DEBUG_H__
2222
#define __UBI_DEBUG_H__
2323

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-
3224
#ifdef CONFIG_MTD_UBI_DEBUG
3325
#include <linux/random.h>
3426

‎drivers/mtd/ubi/ubi.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
#include "ubi-media.h"
4646
#include "scan.h"
47-
#include "debug.h"
4847

4948
/* Maximum number of supported UBI devices */
5049
#define UBI_MAX_DEVICES 32
@@ -478,6 +477,8 @@ struct ubi_device {
478477
struct ubi_debug_info *dbg;
479478
};
480479

480+
#include "debug.h"
481+
481482
extern struct kmem_cache *ubi_wl_entry_slab;
482483
extern const struct file_operations ubi_ctrl_cdev_operations;
483484
extern const struct file_operations ubi_cdev_operations;

0 commit comments

Comments
 (0)