Thread (101 messages) 101 messages, 22 authors, 2015-06-18

Re: [PATCH 01/44] kernel: Add support for poweroff handler call chain

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2014-10-09 11:31:57
Also in: linux-acpi, linux-alpha, linux-arm-kernel, linux-devicetree, linux-efi, linux-m68k, linux-mips, linux-pm, linux-s390, linux-sh, linux-tegra, linux-um, lkml

On Tue, Oct 7, 2014 at 7:28 AM, Guenter Roeck [off-list ref] wrote:
+int register_poweroff_handler_simple(void (*handler)(void), int priority)
+{
+       char symname[KSYM_NAME_LEN];
+
+       if (poweroff_handler_data.handler) {
+               lookup_symbol_name((unsigned long)poweroff_handler_data.handler,
+                                  symname);
+               pr_warn("Poweroff function already registered (%s)", symname);
+               lookup_symbol_name((unsigned long)handler, symname);
+               pr_cont(", cannot register %s\n", symname);
Doesn't %ps work to look up symbols?

pr_warn("Poweroff function already registered (%ps), cannot register
%ps\n", poweroff_handler_data.handler, handler);
+               return -EBUSY;
+       }
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help