aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2005-01-10 17:22:10 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-10 17:22:10 -0800
commit28c947d5fa6198065f2334f63eba25ae1e2076a8 (patch)
tree42d1a53ca40099b8af7aba32f437c8d0068229dc /drivers
parent135a88116e7c5d7ad91430b59634d89ecf8c4bcd (diff)
downloadhistory-28c947d5fa6198065f2334f63eba25ae1e2076a8.tar.gz
[PATCH] fix unresolved MTD symbols in scx200_docflash.c
This driver is using some private #ifdef to try to control the use of partitions and calling functions that get compiled out of the kernel if it's set (which it is by default). This results in unresolved module symbols, which are bad. This patch synchronizes the conditional compilation of partition management in the driver with the global config option for MTD partition management and thereby fixes the unresolved symbol problem. Signed-off-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/maps/scx200_docflash.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c
index 23eb4567cf9888..62df7e6f00e10b 100644
--- a/drivers/mtd/maps/scx200_docflash.c
+++ b/drivers/mtd/maps/scx200_docflash.c
@@ -26,9 +26,6 @@ MODULE_AUTHOR("Christer Weinigel <wingel@hack.org>");
MODULE_DESCRIPTION("NatSemi SCx200 DOCCS Flash Driver");
MODULE_LICENSE("GPL");
-/* Set this to one if you want to partition the flash */
-#define PARTITION 1
-
static int probe = 0; /* Don't autoprobe */
static unsigned size = 0x1000000; /* 16 MiB the whole ISA address space */
static unsigned width = 8; /* Default to 8 bits wide */
@@ -50,7 +47,7 @@ static struct resource docmem = {
static struct mtd_info *mymtd;
-#if PARTITION
+#ifdef CONFIG_MTD_PARTITIONS
static struct mtd_partition partition_info[] = {
{
.name = "DOCCS Boot kernel",
@@ -200,7 +197,7 @@ static int __init init_scx200_docflash(void)
mymtd->owner = THIS_MODULE;
-#if PARTITION
+#ifdef CONFIG_MTD_PARTITIONS
partition_info[3].offset = mymtd->size-partition_info[3].size;
partition_info[2].size = partition_info[3].offset-partition_info[2].offset;
add_mtd_partitions(mymtd, partition_info, NUM_PARTITIONS);
@@ -213,7 +210,7 @@ static int __init init_scx200_docflash(void)
static void __exit cleanup_scx200_docflash(void)
{
if (mymtd) {
-#if PARTITION
+#ifdef CONFIG_MTD_PARTITIONS
del_mtd_partitions(mymtd);
#else
del_mtd_device(mymtd);