Commit 356d70f1 authored by Ben Dooks's avatar Ben Dooks Committed by David Woodhouse

[MTD] mtdcore.c: share syms with mtd_blkdev.c

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: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 029a9eb1
......@@ -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;
......
......@@ -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);
......
/* 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];
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment