rust: samples: driver-core: remove redundant `.as_ref()` for `dev_*` print

This is now handled by the macro itself.

Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260123175854.176735-3-gary@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
master
Gary Guo 2026-01-23 17:58:40 +00:00 committed by Danilo Krummrich
parent 600de1c008
commit 3be458a5a7
4 changed files with 4 additions and 6 deletions

View File

@ -39,7 +39,7 @@ impl auxiliary::Driver for AuxiliaryDriver {
fn probe(adev: &auxiliary::Device<Core>, _info: &Self::IdInfo) -> impl PinInit<Self, Error> { fn probe(adev: &auxiliary::Device<Core>, _info: &Self::IdInfo) -> impl PinInit<Self, Error> {
dev_info!( dev_info!(
adev.as_ref(), adev,
"Probing auxiliary driver for auxiliary device with id={}\n", "Probing auxiliary driver for auxiliary device with id={}\n",
adev.id() adev.id()
); );

View File

@ -26,7 +26,7 @@ impl Module for SampleModule {
let reg = faux::Registration::new(c"rust-faux-sample-device", None)?; let reg = faux::Registration::new(c"rust-faux-sample-device", None)?;
dev_info!(reg.as_ref(), "Hello from faux device!\n"); dev_info!(reg, "Hello from faux device!\n");
Ok(Self { _reg: reg }) Ok(Self { _reg: reg })
} }

View File

@ -180,7 +180,7 @@ impl SampleDriver {
impl Drop for SampleDriver { impl Drop for SampleDriver {
fn drop(&mut self) { fn drop(&mut self) {
dev_dbg!(self.pdev.as_ref(), "Remove Rust Platform driver sample.\n"); dev_dbg!(self.pdev, "Remove Rust Platform driver sample.\n");
} }
} }

View File

@ -44,9 +44,7 @@ impl platform::Driver for SampleSocDriver {
pdev: &platform::Device<Core>, pdev: &platform::Device<Core>,
_info: Option<&Self::IdInfo>, _info: Option<&Self::IdInfo>,
) -> impl PinInit<Self, Error> { ) -> impl PinInit<Self, Error> {
let dev = pdev.as_ref(); dev_dbg!(pdev, "Probe Rust SoC driver sample.\n");
dev_dbg!(dev, "Probe Rust SoC driver sample.\n");
let pdev = pdev.into(); let pdev = pdev.into();
pin_init_scope(move || { pin_init_scope(move || {