From: Ylowy <69316865+YLowy@users.noreply.github.com> Date: Sun, 19 Sep 2021 12:39:56 +0000 (+0800) Subject: Typo. X-Git-Tag: latest~99^2 X-Git-Url: https://www.ivnss.com/gitweb/?a=commitdiff_plain;h=24257e837e24367adaaf2fd332c1afd8b86a3999;p=lkmpg Typo. --- diff --git a/lkmpg.tex b/lkmpg.tex index 1d6da74..032b6df 100644 --- a/lkmpg.tex +++ b/lkmpg.tex @@ -869,7 +869,7 @@ You do this by using the \cpp|register_chrdev| function, defined by \src{include 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.