]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/nettel.c
Merge branch 'rio.b19' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/bird
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / nettel.c
index f00ee7e54dba7dbdaa17a30d3e2ff013d3f3eb6d..0994b5b2e3313f87b8a581f896d315306b87d310 100644 (file)
@@ -6,7 +6,7 @@
  *      (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
  *      (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
  *
- *     $Id: nettel.c,v 1.11 2005/11/07 11:14:27 gleixner Exp $
+ *     $Id: nettel.c,v 1.12 2005/11/29 14:30:00 gleixner Exp $
  */
 
 /****************************************************************************/
@@ -20,6 +20,8 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/cfi.h>
 #include <linux/reboot.h>
+#include <linux/kdev_t.h>
+#include <linux/root_dev.h>
 #include <asm/io.h>
 
 /****************************************************************************/
@@ -128,8 +130,7 @@ static struct mtd_partition nettel_amd_partitions[] = {
        }
 };
 
-#define NUM_AMD_PARTITIONS \
-       (sizeof(nettel_amd_partitions)/sizeof(nettel_amd_partitions[0]))
+#define NUM_AMD_PARTITIONS ARRAY_SIZE(nettel_amd_partitions)
 
 /****************************************************************************/
 
@@ -189,7 +190,7 @@ int nettel_eraseconfig(void)
                set_current_state(TASK_INTERRUPTIBLE);
                add_wait_queue(&wait_q, &wait);
 
-               ret = MTD_ERASE(mtd, &nettel_erase);
+               ret = mtd->erase(mtd, &nettel_erase);
                if (ret) {
                        set_current_state(TASK_RUNNING);
                        remove_wait_queue(&wait_q, &wait);
@@ -479,7 +480,7 @@ void __exit nettel_cleanup(void)
        }
        if (nettel_intel_map.virt) {
                iounmap(nettel_intel_map.virt);
-               nettel_intel_map.virt = 0;
+               nettel_intel_map.virt = NULL;
        }
 #endif
 }