diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 4b77335..3dcd38f 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -4,7 +4,7 @@
# Core functionality.
 obj-$(CONFIG_MTD)              += mtd.o
-mtd-y                          := mtdcore.o mtdsuper.o
+mtd-y                          := mtdcore.o mtdsuper.o mtdbdi.o
 mtd-$(CONFIG_MTD_PARTITIONS)   += mtdpart.o
Hunk failed, do not have mtdsuper.o on line to have ntdbdi.o added. Is this soemthing i will need or am missing? Searching the 2007 distro did no reveal this object( or source).

... other passed until ...

diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index e00d424..5a995ae 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -13,6 +13,7 @@
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/smp_lock.h>
+#include <linux/backing-dev.h>
#include <linux/mtd/mtd.h>
 #include <linux/mtd/compatmac.h>
Hunk failed, do not have '#include <linux/smp_lock.h>' Again is this something i need or is missing?

@@ -109,12 +110,15 @@ static int mtd_open(struct inode *inode, struct file 
*file)
                goto out;
        }
- if (MTD_ABSENT == mtd->type) {
+       if (mtd->type == MTD_ABSENT) {
                put_mtd_device(mtd);
                ret = -ENODEV;
                goto out;
        }
+ if (mtd->backing_dev_info)
+               file->f_mapping->backing_dev_info = mtd->backing_dev_info;
+
        /* You can't open it RW if it's not a writeable device */
        if ((file->f_mode & 2) && !(mtd->flags & MTD_WRITEABLE)) {
                put_mtd_device(mtd);
Hunk failed, didn't fine the first two lines. 'goto out' '}'. Am i missing another patch that needs to be applied to the 2007 distro prior to these patches being applied?


@@ -779,6 +783,59 @@ static int mtd_ioctl(struct inode *inode, struct file 
*file,
        return ret;
 } /* memory_ioctl */
Hunk failed, unknown reason or i couldn't locate it. ...

@@ -787,6 +844,10 @@ static const struct file_operations mtd_fops = {
        .ioctl          = mtd_ioctl,
        .open           = mtd_open,
        .release        = mtd_close,
+       .mmap           = mtd_mmap,
+#ifndef CONFIG_MMU
+       .get_unmapped_area = mtd_get_unmapped_area,
+#endif
 };
static int __init init_mtdchar(void)
This hunk passed, oddly enough.

diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index edb90b5..e609b69 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -84,6 +84,18 @@ static void part_unpoint(struct mtd_info *mtd, loff_t from, 
size_t len)
        part->master->unpoint(part->master, from + part->offset, len);
 }
+static unsigned long part_get_unmapped_area(struct mtd_info *mtd,
+                                           unsigned long len,
+                                           unsigned long offset,
+                                           unsigned long flags)
+{
+       struct mtd_part *part = PART(mtd);
+
+       offset += part->offset;
+       return part->master->get_unmapped_area(part->master, len, offset,
+                                              flags);
+}
+
 static int part_read_oob(struct mtd_info *mtd, loff_t from,
                struct mtd_oob_ops *ops)
 {
Hunk passed

@@ -342,6 +354,7 @@ static struct mtd_part *add_one_partition(struct mtd_info 
*master,
slave->mtd.name = part->name;
        slave->mtd.owner = master->owner;
+       slave->mtd.backing_dev_info = master->backing_dev_info;
slave->mtd.read = part_read;
        slave->mtd.write = part_write;
Hunk failed, have extra code between name and owner above. Do i need to apply other patches?


@@ -354,6 +367,8 @@ static struct mtd_part *add_one_partition(struct mtd_info 
*master,
                slave->mtd.unpoint = part_unpoint;
        }
+ if (master->get_unmapped_area)
+               slave->mtd.get_unmapped_area = part_get_unmapped_area;
        if (master->read_oob)
                slave->mtd.read_oob = part_read_oob;
        if (master->write_oob)

Hunk failed, have extra code prior to if ... read_obb.. Do i need to apply other patches?

tia for your help - bob
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to