Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lkmpg.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ \subsection{Registering A Device}
int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count, const char *name);
\end{code}

The choose of two different functions depend on whether you know the major numbers for your device.
The choice between two different functions depends on whether you know the major numbers for your device.
Using \cpp|register_chrdev_region| if you know the device major number and \cpp|alloc_chrdev_region| if you would like to allocate a dynamicly-allocated major number.

Second, we should initialize the data structure \cpp|struct cdev| for our char device and associate it with the device numbers.
Expand Down