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

powerpc/gamecube|wii : Use machine_device_initcall()

Instead of checking machine type in the function,
use machine_device_initcall().

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
f47b17d5 357f8239

+2 -8
+1 -4
arch/powerpc/platforms/embedded6xx/gamecube.c
··· 83 83 84 84 static int __init gamecube_device_probe(void) 85 85 { 86 - if (!machine_is(gamecube)) 87 - return 0; 88 - 89 86 of_platform_bus_probe(NULL, gamecube_of_bus, NULL); 90 87 return 0; 91 88 } 92 - device_initcall(gamecube_device_probe); 89 + machine_device_initcall(gamecube, gamecube_device_probe); 93 90
+1 -4
arch/powerpc/platforms/embedded6xx/wii.c
··· 161 161 162 162 static int __init wii_device_probe(void) 163 163 { 164 - if (!machine_is(wii)) 165 - return 0; 166 - 167 164 of_platform_populate(NULL, wii_of_bus, NULL, NULL); 168 165 return 0; 169 166 } 170 - device_initcall(wii_device_probe); 167 + machine_device_initcall(wii, wii_device_probe); 171 168 172 169 define_machine(wii) { 173 170 .name = "wii",