Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] 82xx and embedded6xx: Use machine_*_initcall() hooks in platform code

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Grant Likely and committed by
Kumar Gala
ca956f0e b61ad653

+3 -12
+1 -4
arch/powerpc/platforms/82xx/mpc8272_ads.c
··· 165 165 166 166 static int __init declare_of_platform_devices(void) 167 167 { 168 - if (!machine_is(mpc8272_ads)) 169 - return 0; 170 - 171 168 /* Publish the QE devices */ 172 169 of_platform_bus_probe(NULL, of_bus_ids, NULL); 173 170 return 0; 174 171 } 175 - device_initcall(declare_of_platform_devices); 172 + machine_device_initcall(mpc8272_ads, declare_of_platform_devices); 176 173 177 174 /* 178 175 * Called very early, device-tree isn't unflattened
+1 -4
arch/powerpc/platforms/82xx/pq2fads.c
··· 176 176 177 177 static int __init declare_of_platform_devices(void) 178 178 { 179 - if (!machine_is(pq2fads)) 180 - return 0; 181 - 182 179 /* Publish the QE devices */ 183 180 of_platform_bus_probe(NULL, of_bus_ids, NULL); 184 181 return 0; 185 182 } 186 - device_initcall(declare_of_platform_devices); 183 + machine_device_initcall(pq2fads, declare_of_platform_devices); 187 184 188 185 define_machine(pq2fads) 189 186 {
+1 -4
arch/powerpc/platforms/embedded6xx/ls_uart.c
··· 117 117 phys_addr_t phys_addr; 118 118 int len; 119 119 120 - if (!machine_is(linkstation)) 121 - return 0; 122 - 123 120 avr = of_find_node_by_path("/soc10x/serial@80004500"); 124 121 if (!avr) 125 122 return -EINVAL; ··· 139 142 return 0; 140 143 } 141 144 142 - late_initcall(ls_uarts_init); 145 + machine_late_initcall(linkstation, ls_uarts_init);