]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/uclinux.c
MTD/JFFS2: remove CVS keywords
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / uclinux.c
index 79d92808b766fea1f006faedb5fb0d914d712238..bac000a883136e8d586afcb488a4eeca3d6328ef 100644 (file)
@@ -4,20 +4,16 @@
  *     uclinux.c -- generic memory mapped MTD driver for uclinux
  *
  *     (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
- *
- *     $Id: uclinux.c,v 1.12 2005/11/07 11:14:29 gleixner Exp $
  */
 
 /****************************************************************************/
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/major.h>
-#include <linux/root_dev.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/partitions.h>
@@ -37,15 +33,17 @@ struct mtd_partition uclinux_romfs[] = {
        { .name = "ROMfs" }
 };
 
-#define        NUM_PARTITIONS  (sizeof(uclinux_romfs) / sizeof(uclinux_romfs[0]))
+#define        NUM_PARTITIONS  ARRAY_SIZE(uclinux_romfs)
 
 /****************************************************************************/
 
 int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len,
-       size_t *retlen, u_char **mtdbuf)
+       size_t *retlen, void **virt, resource_size_t *phys)
 {
        struct map_info *map = mtd->priv;
-       *mtdbuf = (u_char *) (map->virt + ((int) from));
+       *virt = map->virt + from;
+       if (phys)
+               *phys = map->phys + from;
        *retlen = len;
        return(0);
 }
@@ -90,10 +88,6 @@ int __init uclinux_mtd_init(void)
        uclinux_ram_mtdinfo = mtd;
        add_mtd_partitions(mtd, uclinux_romfs, NUM_PARTITIONS);
 
-       printk("uclinux[mtd]: set %s to be root filesystem\n",
-               uclinux_romfs[0].name);
-       ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, 0);
-
        return(0);
 }