]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[POWERPC] 82xx and embedded6xx: Use machine_*_initcall() hooks in platform code
authorGrant Likely <grant.likely@secretlab.ca>
Fri, 25 Jan 2008 05:23:24 +0000 (22:23 -0700)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 28 Jan 2008 14:30:41 +0000 (08:30 -0600)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/platforms/82xx/mpc8272_ads.c
arch/powerpc/platforms/82xx/pq2fads.c
arch/powerpc/platforms/embedded6xx/ls_uart.c

index fd83440eb287db33eb72b97e334bb38f7c424e6b..3fce6b375dbc5f1d709701281987af8a2f483647 100644 (file)
@@ -165,14 +165,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
 
 static int __init declare_of_platform_devices(void)
 {
-       if (!machine_is(mpc8272_ads))
-               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(mpc8272_ads, declare_of_platform_devices);
 
 /*
  * Called very early, device-tree isn't unflattened
index 1be50050180644811985bfe60f119c6e23b14541..68196e349994afd50d5de9f07e826facc5494c90 100644 (file)
@@ -176,14 +176,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)
 {
index c99264cedda5e5f23e77465f2cd8a94a1614e360..9d891bd5df5a8a21701d5a1461b9fb97908d8aaa 100644 (file)
@@ -117,9 +117,6 @@ static int __init ls_uarts_init(void)
        phys_addr_t phys_addr;
        int len;
 
-       if (!machine_is(linkstation))
-               return 0;
-
        avr = of_find_node_by_path("/soc10x/serial@80004500");
        if (!avr)
                return -EINVAL;
@@ -142,4 +139,4 @@ static int __init ls_uarts_init(void)
        return 0;
 }
 
-late_initcall(ls_uarts_init);
+machine_late_initcall(linkstation, ls_uarts_init);