Skip to content

Commit d5e7f1a

Browse files
authored
fixes #127 -- added a comment to clarify an example
1 parent 7ea525c commit d5e7f1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/char/rust_example.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ impl KernelModule for RustExample {
136136

137137
let mut chrdev_reg =
138138
chrdev::Registration::new_pinned(cstr!("rust_chrdev"), 0, &THIS_MODULE)?;
139+
// Register the same kind of device twice, we're just demonstrating
140+
// that you can use multiple minors.
139141
chrdev_reg.as_mut().register::<RustFile>()?;
140142
chrdev_reg.as_mut().register::<RustFile>()?;
141143

0 commit comments

Comments
 (0)