Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo #248

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
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 examples/hello-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static int __init mymodule_init(void)
{
int error = 0;

pr_info("mymodule: initialised\n");
pr_info("mymodule: initialized\n");

mymodule = kobject_create_and_add("mymodule", kernel_kobj);
if (!mymodule)
Expand Down
2 changes: 1 addition & 1 deletion lkmpg.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ \subsection{Registering A Device}
\end{code}

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.
Using \cpp|register_chrdev_region| if you know the device major number and \cpp|alloc_chrdev_region| if you would like to allocate a dynamically-allocated major number.

Second, we should initialize the data structure \cpp|struct cdev| for our char device and associate it with the device numbers.
To initialize the \cpp|struct cdev|, we can achieve by the similar sequence of the following codes.
Expand Down