of: Remove duplicate fields from of_platform_driver
[pandora-kernel.git] / drivers / mtd / maps / physmap_of.c
index 61e4eb4..4147fe3 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/mtd/concat.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/slab.h>
 
 struct of_flash_list {
        struct mtd_info *mtd;
@@ -142,7 +143,7 @@ static int of_flash_remove(struct of_device *dev)
 static struct mtd_info * __devinit obsolete_probe(struct of_device *dev,
                                                  struct map_info *map)
 {
-       struct device_node *dp = dev->node;
+       struct device_node *dp = dev->dev.of_node;
        const char *of_probe;
        struct mtd_info *mtd;
        static const char *rom_probe_types[]
@@ -179,7 +180,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
        static const char *part_probe_types[]
                = { "cmdlinepart", "RedBoot", NULL };
 #endif
-       struct device_node *dp = dev->node;
+       struct device_node *dp = dev->dev.of_node;
        struct resource res;
        struct of_flash *info;
        const char *probe_type = match->data;
@@ -203,7 +204,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
        p = of_get_property(dp, "reg", &count);
        if (count % reg_tuple_size != 0) {
                dev_err(&dev->dev, "Malformed reg property on %s\n",
-                               dev->node->full_name);
+                               dev->dev.of_node->full_name);
                err = -EINVAL;
                goto err_flash_remove;
        }
@@ -374,8 +375,11 @@ static struct of_device_id of_flash_match[] = {
 MODULE_DEVICE_TABLE(of, of_flash_match);
 
 static struct of_platform_driver of_flash_driver = {
-       .name           = "of-flash",
-       .match_table    = of_flash_match,
+       .driver = {
+               .name = "of-flash",
+               .owner = THIS_MODULE,
+               .of_match_table = of_flash_match,
+       },
        .probe          = of_flash_probe,
        .remove         = of_flash_remove,
 };