/*
- * $Id: physmap.c,v 1.34 2004/07/21 00:16:14 jwboyer Exp $
+ * $Id: physmap.c,v 1.39 2005/11/29 14:49:36 gleixner Exp $
*
* Normal mappings of chips in physical memory
*
#include <linux/mtd/map.h>
#include <linux/config.h>
#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
static struct mtd_info *mymtd;
const char **type;
printk(KERN_NOTICE "physmap flash device: %lx at %lx\n", physmap_map.size, physmap_map.phys);
- physmap_map.virt = (unsigned long)ioremap(physmap_map.phys, physmap_map.size);
+ physmap_map.virt = ioremap(physmap_map.phys, physmap_map.size);
if (!physmap_map.virt) {
printk("Failed to ioremap\n");
mymtd->owner = THIS_MODULE;
#ifdef CONFIG_MTD_PARTITIONS
- mtd_parts_nb = parse_mtd_partitions(mymtd, part_probes,
+ mtd_parts_nb = parse_mtd_partitions(mymtd, part_probes,
&mtd_parts, 0);
if (mtd_parts_nb > 0)
return 0;
}
- if (num_physmap_partitions != 0)
+ if (num_physmap_partitions != 0)
{
- printk(KERN_NOTICE
+ printk(KERN_NOTICE
"Using physmap partition definition\n");
add_mtd_partitions (mymtd, physmap_partitions, num_physmap_partitions);
return 0;
return 0;
}
- iounmap((void *)physmap_map.virt);
+ iounmap(physmap_map.virt);
return -ENXIO;
}
#endif
map_destroy(mymtd);
- iounmap((void *)physmap_map.virt);
- physmap_map.virt = 0;
+ iounmap(physmap_map.virt);
+ physmap_map.virt = NULL;
}
module_init(init_physmap);