[MTD] maps: Add mapping driver for PQ2FADS boards.
[powerpc.git] / drivers / mtd / maps / plat-ram.c
index 808f943..104576b 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generic platfrom device based RAM map
  *
- * $Id: plat-ram.c,v 1.1 2005/01/24 00:37:02 bjd Exp $
+ * $Id: plat-ram.c,v 1.3 2005/03/19 22:41:27 gleixner Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -23,8 +23,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
-#define DEBUG
-
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/init.h>
@@ -32,6 +30,8 @@
 #include <linux/string.h>
 #include <linux/ioport.h>
 #include <linux/device.h>
+#include <linux/slab.h>
+#include <linux/platform_device.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/map.h>
@@ -155,7 +155,7 @@ static int platram_probe(struct device *dev)
                goto exit_error;
        }
 
-       memzero(info, sizeof(*info));
+       memset(info, 0, sizeof(*info));
        dev_set_drvdata(dev, info);
 
        info->dev = dev;
@@ -192,7 +192,7 @@ static int platram_probe(struct device *dev)
        /* remap the memory area */
 
        info->map.virt = ioremap(res->start, info->map.size);
-       dev_dbg(dev, "virt %p, %d bytes\n", info->map.virt, info->map.size);
+       dev_dbg(dev, "virt %p, %lu bytes\n", info->map.virt, info->map.size);
 
        if (info->map.virt == NULL) {
                dev_err(dev, "failed to ioremap() region\n");
@@ -200,12 +200,6 @@ static int platram_probe(struct device *dev)
                goto exit_free;
        }
 
-       {
-               unsigned int *p = (unsigned int *)info->map.virt;
-               printk("%08x %08x %08x %08x\n",
-                      readl(p), readl(p+1), readl(p+2), readl(p+3));
-       }
-
        simple_map_init(&info->map);
 
        dev_dbg(dev, "initialised map, probing for mtd\n");