]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/sparc/kernel/central.c
of: Remove duplicate fields from of_platform_driver
[net-next-2.6.git] / arch / sparc / kernel / central.c
index 4589ca33220ff6463dbd7191259d01debb5fb13f..434335f65823ec944626a9cbe0b9bbccb28bfd86 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <linux/kernel.h>
 #include <linux/types.h>
+#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/of_device.h>
@@ -148,10 +149,11 @@ static struct of_device_id __initdata clock_board_match[] = {
 };
 
 static struct of_platform_driver clock_board_driver = {
-       .match_table    = clock_board_match,
        .probe          = clock_board_probe,
-       .driver         = {
-               .name   = "clock_board",
+       .driver = {
+               .name = "clock_board",
+               .owner = THIS_MODULE,
+               .of_match_table = clock_board_match,
        },
 };
 
@@ -167,7 +169,7 @@ static int __devinit fhc_probe(struct of_device *op,
                goto out;
        }
 
-       if (!strcmp(op->node->parent->name, "central"))
+       if (!strcmp(op->dev.of_node->parent->name, "central"))
                p->central = true;
 
        p->pregs = of_ioremap(&op->resource[0], 0,
@@ -182,7 +184,7 @@ static int __devinit fhc_probe(struct of_device *op,
                reg = upa_readl(p->pregs + FHC_PREGS_BSR);
                p->board_num = ((reg >> 16) & 1) | ((reg >> 12) & 0x0e);
        } else {
-               p->board_num = of_getintprop_default(op->node, "board#", -1);
+               p->board_num = of_getintprop_default(op->dev.of_node, "board#", -1);
                if (p->board_num == -1) {
                        printk(KERN_ERR "fhc: No board# property\n");
                        goto out_unmap_pregs;
@@ -253,10 +255,11 @@ static struct of_device_id __initdata fhc_match[] = {
 };
 
 static struct of_platform_driver fhc_driver = {
-       .match_table    = fhc_match,
        .probe          = fhc_probe,
-       .driver         = {
-               .name   = "fhc",
+       .driver = {
+               .name = "fhc",
+               .owner = THIS_MODULE,
+               .of_match_table = fhc_match,
        },
 };