Skip to content

Commit 5f6e83b

Browse files
authored
Merge pull request #298 from EricccTaiwan/cpp
Fix formatting of 'unsigned int major'
2 parents 918e87e + 9e4311d commit 5f6e83b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lkmpg.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ \subsection{Registering A Device}
10241024
int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);
10251025
\end{code}
10261026

1027-
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.
1027+
Where \cpp|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.
10281028
A negative return value means the registration failed. Note that we didn't pass the minor number to \cpp|register_chrdev|.
10291029
That is because the kernel doesn't care about the minor number; only our driver uses it.
10301030

0 commit comments

Comments
 (0)