Skip to content

Commit

Permalink
[MTD] mtdcore.c: share syms with mtd_blkdev.c
Browse files Browse the repository at this point in the history
Fix the sparse warnings generated by the implicit
dependency of mtd_blkdevs.c and mtd_core.c for the
two symbols mtd_table and mtd_table_mutex. This is
done by adding an local header file mtdcore.h to
define these (including the warning about the
non-proliferation of these symbols).

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Ben Dooks authored and David Woodhouse committed Jun 28, 2007
1 parent 029a9eb commit 356d70f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/mtd/mtd_blkdevs.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
#include <linux/kthread.h>
#include <asm/uaccess.h>

static LIST_HEAD(blktrans_majors);
#include "mtdcore.h"

extern struct mutex mtd_table_mutex;
extern struct mtd_info *mtd_table[];
static LIST_HEAD(blktrans_majors);

struct mtd_blkcore_priv {
struct task_struct *thread;
Expand Down
2 changes: 2 additions & 0 deletions drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include <linux/mtd/mtd.h>

#include "mtdcore.h"

/* These are exported solely for the purpose of mtd_blkdevs.c. You
should not use them for _anything_ else */
DEFINE_MUTEX(mtd_table_mutex);
Expand Down
11 changes: 11 additions & 0 deletions drivers/mtd/mtdcore.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* linux/drivers/mtd/mtdcore.h
*
* Header file for driver private mtdcore exports
*
*/

/* These are exported solely for the purpose of mtd_blkdevs.c. You
should not use them for _anything_ else */

extern struct mutex mtd_table_mutex;
extern struct mtd_info *mtd_table[MAX_MTD_DEVICES];

0 comments on commit 356d70f

Please sign in to comment.