[POWERPC] powermac: Use machine_*_initcall() hooks in platform code
authorGrant Likely <grant.likely@secretlab.ca>
Wed, 2 Jan 2008 19:14:28 +0000 (06:14 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 17 Jan 2008 03:57:14 +0000 (14:57 +1100)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/powermac/low_i2c.c
arch/powerpc/platforms/powermac/pfunc_base.c
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/platforms/powermac/setup.c

index 864fbf4744c0d2f61d451862053f35a9091f54bf..21226b74c9b20e05aa7cb143c1f40a43fc902d15 100644 (file)
@@ -1461,9 +1461,6 @@ int __init pmac_i2c_init(void)
                return 0;
        i2c_inited = 1;
 
-       if (!machine_is(powermac))
-               return 0;
-
        /* Probe keywest-i2c busses */
        kw_i2c_probe();
 
@@ -1482,7 +1479,7 @@ int __init pmac_i2c_init(void)
 
        return 0;
 }
-arch_initcall(pmac_i2c_init);
+machine_arch_initcall(powermac, pmac_i2c_init);
 
 /* Since pmac_i2c_init can be called too early for the platform device
  * registration, we need to do it at a later time. In our case, subsys
@@ -1514,4 +1511,4 @@ static int __init pmac_i2c_create_platform_devices(void)
 
        return 0;
 }
-subsys_initcall(pmac_i2c_create_platform_devices);
+machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices);
index 45d54b9ad9e04b0941bb94699a6373fe0dec53d0..db20de512f3e259c80f5e5c051a1b582d5fe9905 100644 (file)
@@ -363,8 +363,7 @@ int __init pmac_pfunc_base_install(void)
 
        return 0;
 }
-
-arch_initcall(pmac_pfunc_base_install);
+machine_arch_initcall(powermac, pmac_pfunc_base_install);
 
 #ifdef CONFIG_PM
 
index 999f5e160897ba23ba07d7b6ae766d028fa26a7e..cd7216437416412fdaefebecd73c41a509189c26 100644 (file)
@@ -690,6 +690,5 @@ static int __init init_pmacpic_sysfs(void)
        sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic);
        return 0;
 }
-
-subsys_initcall(init_pmacpic_sysfs);
+machine_subsys_initcall(powermac, init_pmacpic_sysfs);
 
index adad4e97638182ce31ef9733ba14c6fd7e1c709f..36ff1b6b7fac43f58a77778947809cdb5ae10014 100644 (file)
@@ -397,17 +397,13 @@ static int initializing = 1;
 
 static int pmac_late_init(void)
 {
-       if (!machine_is(powermac))
-               return -ENODEV;
-
        initializing = 0;
        /* this is udbg (which is __init) and we can later use it during
         * cpu hotplug (in smp_core99_kick_cpu) */
        ppc_md.progress = NULL;
        return 0;
 }
-
-late_initcall(pmac_late_init);
+machine_late_initcall(powermac, pmac_late_init);
 
 /*
  * This is __init_refok because we check for "initializing" before
@@ -534,9 +530,6 @@ static int __init pmac_declare_of_platform_devices(void)
        if (machine_is(chrp))
                return -1;
 
-       if (!machine_is(powermac))
-               return 0;
-
        np = of_find_node_by_name(NULL, "valkyrie");
        if (np)
                of_platform_device_create(np, "valkyrie", NULL);
@@ -551,8 +544,7 @@ static int __init pmac_declare_of_platform_devices(void)
 
        return 0;
 }
-
-device_initcall(pmac_declare_of_platform_devices);
+machine_device_initcall(powermac, pmac_declare_of_platform_devices);
 
 /*
  * Called very early, MMU is off, device-tree isn't unflattened