diff options
| author | Alvin Sun <alvin.sun@linux.dev> | 2026-05-20 10:40:09 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-05-23 13:47:32 +0200 |
| commit | bc58905eb07278914c376af5237a2f39c7ba483b (patch) | |
| tree | 6fb776bee4c2cc2687b6a40193029cd9398307c0 /samples | |
| parent | 1dbd8c44fc8d07a1bbca86a301f5c548a3aed152 (diff) | |
samples: rust_misc_device: use vertical import style
Convert `use` imports to vertical layout for better readability and
maintainability.
Signed-off-by: Alvin Sun <alvin.sun@linux.dev>
Reviewed-by: Onur Özkan <work@onurozkan.dev>
Link: https://patch.msgid.link/20260520-miscdev-use-format-v2-2-64dc48fc1345@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/rust/rust_misc_device.rs | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/samples/rust/rust_misc_device.rs b/samples/rust/rust_misc_device.rs index 87a1fe63533a..41e26c825060 100644 --- a/samples/rust/rust_misc_device.rs +++ b/samples/rust/rust_misc_device.rs @@ -97,14 +97,36 @@ use kernel::{ device::Device, - fs::{File, Kiocb}, - ioctl::{_IO, _IOC_SIZE, _IOR, _IOW}, - iov::{IovIterDest, IovIterSource}, - miscdevice::{MiscDevice, MiscDeviceOptions, MiscDeviceRegistration}, + fs::{ + File, + Kiocb, // + }, + ioctl::{ + _IO, + _IOC_SIZE, + _IOR, + _IOW, // + }, + iov::{ + IovIterDest, + IovIterSource, // + }, + miscdevice::{ + MiscDevice, + MiscDeviceOptions, + MiscDeviceRegistration, // + }, new_mutex, prelude::*, - sync::{aref::ARef, Mutex}, - uaccess::{UserSlice, UserSliceReader, UserSliceWriter}, + sync::{ + aref::ARef, + Mutex, // + }, + uaccess::{ + UserSlice, + UserSliceReader, + UserSliceWriter, // + }, }; const RUST_MISC_DEV_HELLO: u32 = _IO('|' as u32, 0x80); |
