Files
linux-stable-mirror/rust/kernel
Gary Guo a38cd1fea9 rust: device: support dev_printk on all devices
Currently, `dev_*` only works on the core `Device`, but not on any other
bus or class device objects. This causes a pattern of
`dev_info!(pdev.as_ref())` which is not ideal.

This adds support of using these devices directly with `dev_*` macros, by
adding `AsRef` call inside the macro. To make sure we can still use just
`kernel::device::Device`, as `AsRef` implementation is added for it; this
is typical for types that is designed to use with `AsRef` anyway, for
example, `str` implements `AsRef<str>` and `Path` implements `AsRef<Path>`.

Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260123175854.176735-1-gary@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-01-24 01:12:49 +01:00
..
2025-10-20 04:04:23 +02:00
2025-11-05 00:05:38 +01:00
2025-11-29 10:41:09 -08:00
2025-11-04 13:25:29 +01:00
2025-10-22 07:15:19 +02:00
2026-01-02 19:04:12 +01:00
2025-09-06 13:27:20 +02:00
2025-11-24 09:14:47 +13:00
2025-12-28 12:43:56 +01:00
2025-11-13 10:21:01 +01:00
2025-11-16 21:56:57 +01:00
2025-12-28 12:43:56 +01:00