mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-03 23:37:40 -04:00
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:
committed by
Danilo Krummrich
parent
600de1c008
commit
3be458a5a7
@@ -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()
|
||||
);
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 || {
|
||||
|
||||
Reference in New Issue
Block a user