]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/platforms/82xx/pq2fads.c
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / arch / powerpc / platforms / 82xx / pq2fads.c
index 1be50050180644811985bfe60f119c6e23b14541..e1dceeec49944aba3e07ecb967abe37e07c822bf 100644 (file)
@@ -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)
 {