[PATCH v3 3/3] rust: clk: use 'kernel vertical style' for imports

Daniel Almeida
2026-01-07T15:10:14Z

Convert all imports to use the new import style. This will make it easier
to land new changes in the future.

No change of functionality implied.

Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
---
rust/kernel/clk.rs | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs
index e840e7c20af7..73a2b51414a1 100644
--- a/rust/kernel/clk.rs
+++ b/rust/kernel/clk.rs
@@ -80,12 +80,23 @@ fn from(freq: Hertz) -> Self {
mod common_clk {
use super::Hertz;
use crate::{
- device::{Bound, Device},
- error::{from_err_ptr, to_result, Result},
- prelude::*,
+ device::{
+ Bound,
+ Device, //
+ },
+ error::{
+ from_err_ptr,
+ to_result,
+ Result, //
+ },
+ prelude::*, //
};

- use core::{marker::PhantomData, mem::ManuallyDrop, ptr};
+ use core::{
+ marker::PhantomData,
+ mem::ManuallyDrop,
+ ptr, //
+ };

mod private {
pub trait Sealed {}
@@ -216,8 +227,17 @@ pub struct Error<State: ClkState> {
///
/// ```
/// use kernel::c_str;
- /// use kernel::clk::{Clk, Enabled, Hertz, Unprepared, Prepared};
- /// use kernel::device::{Bound, Device};
+ /// use kernel::clk::{
+ /// Clk,
+ /// Enabled,
+ /// Hertz,
+ /// Prepared,
+ /// Unprepared, //
+ /// };
+ /// use kernel::device::{
+ /// Bound,
+ /// Device, //
+ /// };
/// use kernel::error::Result;
///
/// fn configure_clk(dev: &Device<Bound>) -> Result {

--
2.52.0