]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/mtd/onenand/generic.c
MTD: OneNAND: interrupt based wait support
[net-next-2.6.git] / drivers / mtd / onenand / generic.c
index 48cce431f89f3ebe498fc8673ee69606c5017848..cdf80c68160ffcfdbf763811a1602249e0f4af14 100644 (file)
  *   This is a device driver for the OneNAND flash for generic boards.
  */
 
-#include <linux/device.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/platform_device.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 #include <linux/mtd/partitions.h>
@@ -39,7 +40,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
 {
        struct onenand_info *info;
        struct platform_device *pdev = to_platform_device(dev);
-       struct onenand_platform_data *pdata = pdev->dev.platform_data;
+       struct flash_platform_data *pdata = pdev->dev.platform_data;
        struct resource *res = pdev->resource;
        unsigned long size = res->end - res->start + 1;
        int err;
@@ -62,6 +63,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
        }
 
        info->onenand.mmcontrol = pdata->mmcontrol;
+       info->onenand.irq = platform_get_irq(pdev, 0);
 
        info->mtd.name = pdev->dev.bus_id;
        info->mtd.priv = &info->onenand;