]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/sa1100-flash.c
Merge branch 'for-next' of git://git.o-hand.com/linux-mfd
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / sa1100-flash.c
index 950bf1c578417f0d2ba3d5b035fd0adb8e5b99ac..7df6bbf0e4d9337e8ea01da8f93b1821577ca8c3 100644 (file)
@@ -2,8 +2,6 @@
  * Flash memory access on SA11x0 based devices
  *
  * (C) 2000 Nicolas Pitre <nico@cam.org>
- *
- * $Id: sa1100-flash.c,v 1.51 2005/11/07 11:14:28 gleixner Exp $
  */
 #include <linux/module.h>
 #include <linux/types.h>
@@ -20,7 +18,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/concat.h>
 
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/io.h>
 #include <asm/sizes.h>
 #include <asm/mach/flash.h>
@@ -273,14 +271,12 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
        /*
         * Allocate the map_info structs in one go.
         */
-       info = kmalloc(size, GFP_KERNEL);
+       info = kzalloc(size, GFP_KERNEL);
        if (!info) {
                ret = -ENOMEM;
                goto out;
        }
 
-       memset(info, 0, size);
-
        if (plat->init) {
                ret = plat->init();
                if (ret)
@@ -458,6 +454,7 @@ static struct platform_driver sa1100_mtd_driver = {
        .shutdown       = sa1100_mtd_shutdown,
        .driver         = {
                .name   = "flash",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -477,3 +474,4 @@ module_exit(sa1100_mtd_exit);
 MODULE_AUTHOR("Nicolas Pitre");
 MODULE_DESCRIPTION("SA1100 CFI map driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:flash");