Skip to content

Commit

Permalink
Typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
YLowy authored Sep 19, 2021
1 parent 09e636c commit 24257e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lkmpg.tex
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ \subsection{Registering A Device}
int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);
\end{code}

where unsigned int major is the major number you want to request, \cpp|const char *name| is the name of the device as it will appear in \verb|/proc/devices| and \cpp|struct file_operations *fops| is a pointer to the \cpp|file_operations| table for your driver.
Where unsigned int major is the major number you want to request, \cpp|const char *name| is the name of the device as it will appear in \verb|/proc/devices| and \cpp|struct file_operations *fops| is a pointer to the \cpp|file_operations| table for your driver.
A negative return value means the registration failed. Note that we didn't pass the minor number to \cpp|register_chrdev|.
That is because the kernel doesn't care about the minor number; only our driver uses it.

Expand Down

0 comments on commit 24257e8

Please sign in to comment.