]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/82xx/pq2fads.c
Merge branch 'topic/hda-gateway' into topic/hda
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / 82xx / pq2fads.c
index 4f457a9c79aebee64db8e8e717147cf6ac852c20..e1dceeec49944aba3e07ecb967abe37e07c822bf 100644 (file)
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/fsl_devices.h>
+#include <linux/of_platform.h>
 
 #include <asm/io.h>
 #include <asm/cpm2.h>
 #include <asm/udbg.h>
 #include <asm/machdep.h>
-#include <asm/of_platform.h>
 #include <asm/time.h>
 
 #include <sysdev/fsl_soc.h>
@@ -130,13 +130,12 @@ static void __init pq2fads_setup_arch(void)
        }
 
        bcsr = of_iomap(np, 0);
+       of_node_put(np);
        if (!bcsr) {
                printk(KERN_ERR "Cannot map BCSR registers\n");
                return;
        }
 
-       of_node_put(np);
-
        /* Enable the serial and ethernet ports */
 
        clrbits32(&bcsr[1], BCSR1_RS232_EN1 | BCSR1_RS232_EN2 | BCSR1_FETHIEN);
@@ -176,14 +175,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
 
 static int __init declare_of_platform_devices(void)
 {
-       if (!machine_is(pq2fads))
-               return 0;
-
        /* Publish the QE devices */
        of_platform_bus_probe(NULL, of_bus_ids, NULL);
        return 0;
 }
-device_initcall(declare_of_platform_devices);
+machine_device_initcall(pq2fads, declare_of_platform_devices);
 
 define_machine(pq2fads)
 {