Skip to content

Commit

Permalink
UBI: make it possible to use struct ubi_device in debug.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jun 1, 2011
1 parent 27a0f2a commit 1807373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions drivers/mtd/ubi/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
#ifndef __UBI_DEBUG_H__
#define __UBI_DEBUG_H__

struct ubi_ec_hdr;
struct ubi_vid_hdr;
struct ubi_volume;
struct ubi_vtbl_record;
struct ubi_scan_volume;
struct ubi_scan_leb;
struct ubi_mkvol_req;

#ifdef CONFIG_MTD_UBI_DEBUG
#include <linux/random.h>

Expand Down
3 changes: 2 additions & 1 deletion drivers/mtd/ubi/ubi.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

#include "ubi-media.h"
#include "scan.h"
#include "debug.h"

/* Maximum number of supported UBI devices */
#define UBI_MAX_DEVICES 32
Expand Down Expand Up @@ -478,6 +477,8 @@ struct ubi_device {
struct ubi_debug_info *dbg;
};

#include "debug.h"

extern struct kmem_cache *ubi_wl_entry_slab;
extern const struct file_operations ubi_ctrl_cdev_operations;
extern const struct file_operations ubi_cdev_operations;
Expand Down

0 comments on commit 1807373

Please sign in to comment.