Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / mtd / maps / ceiva.c
index e34420b..5a95ab3 100644 (file)
@@ -11,7 +11,7 @@
  *
  * (C) 2000 Nicolas Pitre <nico@cam.org>
  *
- * $Id: ceiva.c,v 1.10 2004/07/12 21:59:43 dwmw2 Exp $
+ * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $
  */
 
 #include <linux/config.h>
@@ -20,6 +20,7 @@
 #include <linux/ioport.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/slab.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/map.h>
@@ -103,7 +104,7 @@ struct clps_info {
        unsigned long base;
        unsigned long size;
        int width;
-       void __iomem *vbase;
+       void *vbase;
        struct map_info *map;
        struct mtd_info *mtd;
        struct resource *res;
@@ -150,7 +151,7 @@ static int __init clps_setup_mtd(struct clps_info *clps, int nr, struct mtd_info
                        break;
                }
 
-               clps[i].map->virt = clps[i].vbase;
+               clps[i].map->virt = (void __iomem *)clps[i].vbase;
                clps[i].map->bankwidth = clps[i].width;
                clps[i].map->size = clps[i].size;
 
@@ -312,8 +313,7 @@ static void __init clps_locate_partitions(struct mtd_info *mtd)
 
 static void __exit clps_destroy_partitions(void)
 {
-       if (parsed_parts)
-               kfree(parsed_parts);
+       kfree(parsed_parts);
 }
 
 static struct mtd_info *mymtd;