Skip to contentSkip to conversation

arch: hexagon: kernel: reset.c: use function pointer instead of function for pm_power_off and export it

PATCH In review Chen Gang 2 participants 2 messages Nov 29, 2013 – Dec 6, 2013 Qualcomm hexagon architecture

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 arch: hexagon: kernel: reset.c: use function pointer instead of function for pm_power_off and export it

'pm_power_off' is a function pointer, not a function, so need change its type, and also need export it, or can not pass compiling with allmodconfig. The related error:

MODPOST 2879 modules
ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined!

---
 arch/hexagon/kernel/reset.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
arch/hexagon/kernel/reset.c +2 -3
index 6aeabc9..76483c1 100644
@@ -33,6 +33,5 @@ void machine_restart(char *cmd)
 {
 }
 
-void pm_power_off(void)
-{
-}
+void (*pm_power_off)(void) = NULL;
+EXPORT_SYMBOL(pm_power_off);
Signature · 1 line
1.7.7.6
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Chen Gang

'pm_power_off' is a function pointer, not a function, so need change its type, and also need export it, or can not pass compiling with allmodconfig. The related error:

Quoted 9 lines

MODPOST 2879 modules
ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined!

---
 arch/hexagon/kernel/reset.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
Signature · 3 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation