We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7ea525c + 80cce19 commit 891b952Copy full SHA for 891b952
drivers/char/rust_example.rs
@@ -136,6 +136,9 @@ impl KernelModule for RustExample {
136
137
let mut chrdev_reg =
138
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. There are two minors in this case
141
+ // because its type is `chrdev::Registration<2>`
142
chrdev_reg.as_mut().register::<RustFile>()?;
143
144
0 commit comments