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 <[email protected]> --- rust/kernel/clk.rs | 56 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs index 692ee88ca772..1412a2f0aedf 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 {} @@ -189,8 +200,15 @@ impl<State: ClkState> From<Error<State>> for kernel::error::Error { /// original [`Clk`], e.g.: /// /// ``` - /// use kernel::clk::{Clk, Enabled, Unprepared}; - /// use kernel::device::{Bound, Device}; + /// use kernel::clk::{ + /// Clk, + /// Enabled, + /// Unprepared, // + /// }; + /// use kernel::device::{ + /// Bound, + /// Device, // + /// }; /// use kernel::error::Result; /// /// fn get_enabled(dev: &Device<Bound>) -> Result<Clk<Enabled>> { @@ -240,8 +258,17 @@ fn from(err: Error<State>) -> Self { /// The following example demonstrates how to obtain and configure a clock for a device. /// /// ``` - /// 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 { @@ -287,7 +314,11 @@ fn from(err: Error<State>) -> Self { /// and move between the variants: /// /// ``` - /// use kernel::clk::{Clk, Enabled, Prepared}; + /// use kernel::clk::{ + /// Clk, + /// Enabled, + /// Prepared, // + /// }; /// use kernel::error::Result; /// /// enum DeviceClk { @@ -481,7 +512,12 @@ pub fn enable(self) -> Result<Clk<Enabled>, Error<Prepared>> { /// clock or threading it through an intermediate state, e.g.: /// /// ``` - /// use kernel::clk::{Clk, Enabled, Hertz, Prepared}; + /// use kernel::clk::{ + /// Clk, + /// Enabled, + /// Hertz, + /// Prepared, // + /// }; /// use kernel::error::Result; /// /// fn read_rate(clk: &Clk<Prepared>) -> Result<Hertz> { -- 2.54.0
