diff --git a/drivers/char/rust_example.rs b/drivers/char/rust_example.rs index 1761f734d23371..3008cd21b01fb4 100644 --- a/drivers/char/rust_example.rs +++ b/drivers/char/rust_example.rs @@ -136,6 +136,9 @@ impl KernelModule for RustExample { let mut chrdev_reg = chrdev::Registration::new_pinned(cstr!("rust_chrdev"), 0, &THIS_MODULE)?; + // Register the same kind of device twice, we're just demonstrating + // that you can use multiple minors. There are two minors in this case + // because its type is `chrdev::Registration<2>` chrdev_reg.as_mut().register::()?; chrdev_reg.as_mut().register::()?;