can not resolve global kernel variable.

Kyle McMartin kyle at mcmartin.ca
Tue Feb 19 15:53:22 UTC 2008


On Tue, Feb 19, 2008 at 01:41:15PM +0200, Eugene Goubine wrote:
> Hello , dear list users.
> >From my module I am trying to register for the system suspend using the *
> register_pm_notifier(nb)*
> which is expanded to *blocking_notifier_chain_register(&pm_chain_head, nb).*
> **
> I have a linker warning which tells "pm_chain_head" is undefined. I do
> see  pm_chain_head in my /proc/kallsyms.
> What do I miss? Thank you.

It's hard to comment on it if you don't attach the source code...

At a guess, you tried using register_pm_notifier, that failed to link,
so you tried to use the function that it calls, which won't work since
pm_chain_head is static to the kernel/power/main.c compilation unit.

License your module under the GPL and add MODULE_LICENSE("GPL") and
you'll be able to use the register_pm_notifier export...

regards, Kyle




More information about the Fedora-kernel-list mailing list