Commit d518b717 authored by Grant Likely's avatar Grant Likely Committed by Paul Mackerras

[POWERPC] powermac: Use machine_*_initcall() hooks in platform code

Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 97759e49
...@@ -1461,9 +1461,6 @@ int __init pmac_i2c_init(void) ...@@ -1461,9 +1461,6 @@ int __init pmac_i2c_init(void)
return 0; return 0;
i2c_inited = 1; i2c_inited = 1;
if (!machine_is(powermac))
return 0;
/* Probe keywest-i2c busses */ /* Probe keywest-i2c busses */
kw_i2c_probe(); kw_i2c_probe();
...@@ -1482,7 +1479,7 @@ int __init pmac_i2c_init(void) ...@@ -1482,7 +1479,7 @@ int __init pmac_i2c_init(void)
return 0; 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 /* 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 * 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) ...@@ -1514,4 +1511,4 @@ static int __init pmac_i2c_create_platform_devices(void)
return 0; return 0;
} }
subsys_initcall(pmac_i2c_create_platform_devices); machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices);
...@@ -363,8 +363,7 @@ int __init pmac_pfunc_base_install(void) ...@@ -363,8 +363,7 @@ int __init pmac_pfunc_base_install(void)
return 0; return 0;
} }
machine_arch_initcall(powermac, pmac_pfunc_base_install);
arch_initcall(pmac_pfunc_base_install);
#ifdef CONFIG_PM #ifdef CONFIG_PM
......
...@@ -690,6 +690,5 @@ static int __init init_pmacpic_sysfs(void) ...@@ -690,6 +690,5 @@ static int __init init_pmacpic_sysfs(void)
sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic); sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic);
return 0; return 0;
} }
machine_subsys_initcall(powermac, init_pmacpic_sysfs);
subsys_initcall(init_pmacpic_sysfs);
...@@ -397,17 +397,13 @@ static int initializing = 1; ...@@ -397,17 +397,13 @@ static int initializing = 1;
static int pmac_late_init(void) static int pmac_late_init(void)
{ {
if (!machine_is(powermac))
return -ENODEV;
initializing = 0; initializing = 0;
/* this is udbg (which is __init) and we can later use it during /* this is udbg (which is __init) and we can later use it during
* cpu hotplug (in smp_core99_kick_cpu) */ * cpu hotplug (in smp_core99_kick_cpu) */
ppc_md.progress = NULL; ppc_md.progress = NULL;
return 0; return 0;
} }
machine_late_initcall(powermac, pmac_late_init);
late_initcall(pmac_late_init);
/* /*
* This is __init_refok because we check for "initializing" before * This is __init_refok because we check for "initializing" before
...@@ -534,9 +530,6 @@ static int __init pmac_declare_of_platform_devices(void) ...@@ -534,9 +530,6 @@ static int __init pmac_declare_of_platform_devices(void)
if (machine_is(chrp)) if (machine_is(chrp))
return -1; return -1;
if (!machine_is(powermac))
return 0;
np = of_find_node_by_name(NULL, "valkyrie"); np = of_find_node_by_name(NULL, "valkyrie");
if (np) if (np)
of_platform_device_create(np, "valkyrie", NULL); of_platform_device_create(np, "valkyrie", NULL);
...@@ -551,8 +544,7 @@ static int __init pmac_declare_of_platform_devices(void) ...@@ -551,8 +544,7 @@ static int __init pmac_declare_of_platform_devices(void)
return 0; return 0;
} }
machine_device_initcall(powermac, pmac_declare_of_platform_devices);
device_initcall(pmac_declare_of_platform_devices);
/* /*
* Called very early, MMU is off, device-tree isn't unflattened * Called very early, MMU is off, device-tree isn't unflattened
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment