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
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> {
|
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()
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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 })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 || {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue