Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / mtd / maps / iq80310.c
index 17d7c77..62d9e87 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * $Id: iq80310.c,v 1.18 2004/07/12 21:59:44 dwmw2 Exp $
+ * $Id: iq80310.c,v 1.21 2005/11/07 11:14:27 gleixner Exp $
  *
  * Mapping for the Intel XScale IQ80310 evaluation board
  *
  * Author:     Nicolas Pitre
  * Copyright:  (C) 2001 MontaVista Software Inc.
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -68,7 +68,7 @@ static int __init init_iq80310(void)
        int parsed_nr_parts = 0;
        int ret;
 
-       iq80310_map.virt = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
+       iq80310_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
        if (!iq80310_map.virt) {
                printk("Failed to ioremap\n");
                return -EIO;
@@ -103,8 +103,7 @@ static void __exit cleanup_iq80310(void)
        if (mymtd) {
                del_mtd_partitions(mymtd);
                map_destroy(mymtd);
-               if (parsed_parts)
-                       kfree(parsed_parts);
+               kfree(parsed_parts);
        }
        if (iq80310_map.virt)
                iounmap((void *)iq80310_map.virt);