You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lkmpg.tex
+1-1
Original file line number
Diff line number
Diff line change
@@ -1024,7 +1024,7 @@ \subsection{Registering A Device}
1024
1024
int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);
1025
1025
\end{code}
1026
1026
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.
1028
1028
A negative return value means the registration failed. Note that we didn't pass the minor number to \cpp|register_chrdev|.
1029
1029
That is because the kernel doesn't care about the minor number; only our driver uses it.
0 commit comments