mtd/drivers/mtd Kconfig, 1.5, 1.6 Makefile.common, 1.3,
1.4 mtdchar.c, 1.62, 1.63 mtdpart.c, 1.46, 1.47
David Woodhouse
dwmw2 at infradead.org
Mon Aug 9 09:20:15 EDT 2004
Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv5601/drivers/mtd
Modified Files:
Kconfig Makefile.common mtdchar.c mtdpart.c
Log Message:
Change alls driver to mtd_erase_callback, make partitions non-modular.
Index: Kconfig
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/Kconfig,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Kconfig 4 Jun 2004 15:59:32 -0000 1.5
+++ Kconfig 9 Aug 2004 13:19:42 -0000 1.6
@@ -28,7 +28,7 @@
Determines the verbosity level of the MTD debugging messages.
config MTD_PARTITIONS
- tristate "MTD partitioning support"
+ bool "MTD partitioning support"
depends on MTD
help
If you have a device which needs to divide its flash chip(s) up
Index: Makefile.common
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/Makefile.common,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.common 12 Jul 2004 16:07:30 -0000 1.3
+++ Makefile.common 9 Aug 2004 13:19:42 -0000 1.4
@@ -4,7 +4,10 @@
# $Id$
# Core functionality.
-obj-$(CONFIG_MTD) += mtdcore.o
+mtd-y := mtdcore.o
+mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
+obj-$(CONFIG_MTD) += $(mtd-y)
+
obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
obj-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
Index: mtdchar.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdchar.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- mtdchar.c 14 Jul 2004 13:20:42 -0000 1.62
+++ mtdchar.c 9 Aug 2004 13:19:42 -0000 1.63
@@ -262,7 +262,7 @@
IOCTL calls for getting device parameters.
======================================================================*/
-static void mtd_erase_callback (struct erase_info *instr)
+static void mtdchar_erase_callback (struct erase_info *instr)
{
wake_up((wait_queue_head_t *)instr->priv);
}
@@ -336,7 +336,7 @@
return -EFAULT;
}
erase->mtd = mtd;
- erase->callback = mtd_erase_callback;
+ erase->callback = mtdchar_erase_callback;
erase->priv = (unsigned long)&waitq;
/*
Index: mtdpart.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdpart.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- mtdpart.c 12 Jul 2004 13:28:07 -0000 1.46
+++ mtdpart.c 9 Aug 2004 13:19:42 -0000 1.47
@@ -246,11 +246,21 @@
return -EINVAL;
instr->addr += part->offset;
ret = part->master->erase(part->master, instr);
- if (instr->fail_addr != 0xffffffff)
- instr->fail_addr -= part->offset;
return ret;
}
+void mtd_erase_callback(struct erase_info *instr)
+{
+ if (instr->mtd->erase == part_erase) {
+ struct mtd_part *part = PART(mtd);
+
+ if (instr->fail_addr != 0xffffffff)
+ instr->fail_addr -= part->offset;
+ }
+ if (instr->callback)
+ instr->callback(instr);
+}
+
static int part_lock (struct mtd_info *mtd, loff_t ofs, size_t len)
{
struct mtd_part *part = PART(mtd);
More information about the linux-mtd-cvs
mailing list