[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
__init and __exit vs module_init()
Howdy,
What I am wondering is, is __init equal to module_init()?
Basicly... I was confussed as to what happens if you want to
compile a driver directly into the kernel. Then I discovered __init.
There needs to be some way the kernel knows what the entry point
of the driver is, and if you have module_init() everything is all well and
good, the kernel is happy as it knows what the entry point is, but what if
you dont compile as a module? Then all of a suddenly the kernel doesnt
know what the entry point is because all you have given it is the entry
point "IF" it was compiled as a module. Is the purpose of __init to tell
the kernel the entry point in the event that the driver is compiled
directly into the kernel?
The best answer I could get would be from "Linux Device Drivers"
by Oreilly. Though I found there explanation cryptic.
Thanks for the help
-Dan Erickson-
-ColdOneKnight@rogers.com-
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/