mirror of
https://github.com/sysprog21/lkmpg.git
synced 2025-01-23 06:51:02 +08:00
Point to corresponding kernel header
This commit is contained in:
parent
a4c44ed3d1
commit
e800505b8f
|
@ -858,7 +858,7 @@ The minor number is used only by the driver itself to differentiate which device
|
||||||
|
|
||||||
Adding a driver to your system means registering it with the kernel.
|
Adding a driver to your system means registering it with the kernel.
|
||||||
This is synonymous with assigning it a major number during the module's initialization.
|
This is synonymous with assigning it a major number during the module's initialization.
|
||||||
You do this by using the \cpp|register_chrdev| function, defined by linux/fs.h.
|
You do this by using the \cpp|register_chrdev| function, defined by \src{include/linux/fs.h}.
|
||||||
|
|
||||||
\begin{code}
|
\begin{code}
|
||||||
int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);
|
int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user