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>
This commit is contained in:
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> {
dev_info!(
adev.as_ref(),
adev,
"Probing auxiliary driver for auxiliary device with id={}\n",
adev.id()
);

View file

@ -26,7 +26,7 @@ impl Module for SampleModule {
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 })
}

View file

@ -180,7 +180,7 @@ impl SampleDriver {
impl Drop for SampleDriver {
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>,
_info: Option<&Self::IdInfo>,
) -> impl PinInit<Self, Error> {
let dev = pdev.as_ref();
dev_dbg!(dev, "Probe Rust SoC driver sample.\n");
dev_dbg!(pdev, "Probe Rust SoC driver sample.\n");
let pdev = pdev.into();
pin_init_scope(move || {