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

powerpc/512x: Make mpc512x_select_reset_compat() static

mpc512x_select_reset_compat() is only used in the file it
is defined.

Make it static.

Move mpc512x_restart_init() after mpc512x_select_reset_compat().

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

authored by

Christophe Leroy and committed by
Michael Ellerman
be922070 f94a84a0

+15 -16
-1
arch/powerpc/platforms/512x/mpc512x.h
··· 13 13 extern void __init mpc512x_setup_arch(void); 14 14 extern int __init mpc5121_clk_init(void); 15 15 const char *__init mpc512x_select_psc_compat(void); 16 - const char *__init mpc512x_select_reset_compat(void); 17 16 extern void __noreturn mpc512x_restart(char *cmd); 18 17 19 18 #endif /* __MPC512X_H__ */
+15 -15
arch/powerpc/platforms/512x/mpc512x_shared.c
··· 29 29 30 30 static struct mpc512x_reset_module __iomem *reset_module_base; 31 31 32 - static void __init mpc512x_restart_init(void) 33 - { 34 - struct device_node *np; 35 - const char *reset_compat; 36 - 37 - reset_compat = mpc512x_select_reset_compat(); 38 - np = of_find_compatible_node(NULL, NULL, reset_compat); 39 - if (!np) 40 - return; 41 - 42 - reset_module_base = of_iomap(np, 0); 43 - of_node_put(np); 44 - } 45 - 46 32 void __noreturn mpc512x_restart(char *cmd) 47 33 { 48 34 if (reset_module_base) { ··· 349 363 return NULL; 350 364 } 351 365 352 - const char *__init mpc512x_select_reset_compat(void) 366 + static const char *__init mpc512x_select_reset_compat(void) 353 367 { 354 368 if (of_machine_is_compatible("fsl,mpc5121")) 355 369 return "fsl,mpc5121-reset"; ··· 439 453 440 454 iounmap(psc); 441 455 } 456 + } 457 + 458 + static void __init mpc512x_restart_init(void) 459 + { 460 + struct device_node *np; 461 + const char *reset_compat; 462 + 463 + reset_compat = mpc512x_select_reset_compat(); 464 + np = of_find_compatible_node(NULL, NULL, reset_compat); 465 + if (!np) 466 + return; 467 + 468 + reset_module_base = of_iomap(np, 0); 469 + of_node_put(np); 442 470 } 443 471 444 472 void __init mpc512x_init_early(void)