* [PATCH] MIPS: Export _machine_restart to modules
@ 2022-05-25 1:26 zhanggenjian
0 siblings, 0 replies; only message in thread
From: zhanggenjian @ 2022-05-25 1:26 UTC (permalink / raw)
To: tsbogend; +Cc: linux-mips, linux-kernel, huhai, zhanggenjian123
From: huhai <huhai@kylinos.cn>
modpost complains once these drivers become modules.
ERROR: modpost: "_machine_restart" [drivers/char/tb0219.ko] undefined!
Fix it by export them when that symbol is =m.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: huhai <huhai@kylinos.cn>
---
arch/mips/kernel/reset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c
index 6288780b779e..f3420a871087 100644
--- a/arch/mips/kernel/reset.c
+++ b/arch/mips/kernel/reset.c
@@ -24,6 +24,9 @@
* functions.
*/
void (*_machine_restart)(char *command);
+#ifdef CONFIG_GPIO_TB0219_MODULE
+EXPORT_SYMBOL_GPL(_machine_restart);
+#endif
void (*_machine_halt)(void);
void (*pm_power_off)(void);
--
2.27.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-25 1:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 1:26 [PATCH] MIPS: Export _machine_restart to modules zhanggenjian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).