[POWERPC] 85xx: convert boards to use machine_device_initcall
authorKumar Gala <galak@kernel.crashing.org>
Tue, 15 Jan 2008 15:42:36 +0000 (09:42 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 24 Jan 2008 01:32:37 +0000 (19:32 -0600)
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/85xx/mpc85xx_cds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c

index bccdc25f83a26873f98788f6de94643f63a616c7..eb0a46bb1cccdb757748f91f66383d3b14d02cd1 100644 (file)
@@ -233,13 +233,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
 
 static int __init declare_of_platform_devices(void)
 {
-       if (!machine_is(mpc85xx_ads))
-               return 0;
-
        of_platform_bus_probe(NULL, of_bus_ids, NULL);
+
        return 0;
 }
-device_initcall(declare_of_platform_devices);
+machine_device_initcall(mpc85xx_ads, declare_of_platform_devices);
 
 /*
  * Called very early, device-tree isn't unflattened
index 4d063eec62107fe6a38adfe75de5218e04af7b08..8b1de7884be6e8d8e0d2182ec5fc04149f8209a8 100644 (file)
@@ -222,9 +222,6 @@ static int mpc85xx_cds_8259_attach(void)
        struct device_node *cascade_node = NULL;
        int cascade_irq;
 
-       if (!machine_is(mpc85xx_cds))
-               return 0;
-
        /* Initialize the i8259 controller */
        for_each_node_by_type(np, "interrupt-controller")
                if (of_device_is_compatible(np, "chrp,iic")) {
@@ -262,8 +259,7 @@ static int mpc85xx_cds_8259_attach(void)
 
        return 0;
 }
-
-device_initcall(mpc85xx_cds_8259_attach);
+machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
 
 #endif /* CONFIG_PPC_I8259 */
 
index e6c63a5b1efb56bbf9407cae92108d7b37448e44..4fdf5abefffd8384fb24dcfa1724e8350e472acc 100644 (file)
@@ -144,15 +144,12 @@ static struct of_device_id mpc85xx_ids[] = {
 
 static int __init mpc85xx_publish_devices(void)
 {
-       if (!machine_is(mpc85xx_mds))
-               return 0;
-
        /* Publish the QE devices */
-       of_platform_bus_probe(NULL,mpc85xx_ids,NULL);
+       of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
 
        return 0;
 }
-device_initcall(mpc85xx_publish_devices);
+machine_device_initcall(mpc85xx_mds, mpc85xx_publish_devices);
 
 static void __init mpc85xx_mds_pic_init(void)
 {