Skip to content

Commit 80cce19

Browse files
authored
Update rust_example.rs
1 parent d5e7f1a commit 80cce19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/char/rust_example.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ impl KernelModule for RustExample {
137137
let mut chrdev_reg =
138138
chrdev::Registration::new_pinned(cstr!("rust_chrdev"), 0, &THIS_MODULE)?;
139139
// Register the same kind of device twice, we're just demonstrating
140-
// that you can use multiple minors.
140+
// that you can use multiple minors. There are two minors in this case
141+
// because its type is `chrdev::Registration<2>`
141142
chrdev_reg.as_mut().register::<RustFile>()?;
142143
chrdev_reg.as_mut().register::<RustFile>()?;
143144

0 commit comments

Comments
 (0)