Skip to content

Commit 08eee1a

Browse files
authored
Merge pull request #154 from leovincentseles/master
module_init and module_exit are defined in module.h
2 parents 63ac35d + 22ebabe commit 08eee1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lkmpg.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ \subsection{The Simplest Module}
419419
\subsection{Hello and Goodbye}
420420
\label{hello_n_goodbye}
421421
In early kernel versions you had to use the \cpp|init_module| and \cpp|cleanup_module| functions, as in the first hello world example, but these days you can name those anything you want by using the \cpp|module_init| and \cpp|module_exit| macros.
422-
These macros are defined in \src{include/linux/init.h}.
422+
These macros are defined in \src{include/linux/module.h}.
423423
The only requirement is that your init and cleanup functions must be defined before calling the those macros, otherwise you'll get compilation errors.
424424
Here is an example of this technique:
425425

0 commit comments

Comments
 (0)