[PATCH v6 08/25] rust: device: Expose Device as_raw() publicly
From: alistair23
Date: Mon Nov 09 2026 - 23:23:15 EST
From: Alistair Francis <alistair.francis@xxxxxxx>
We are going to call the as_raw() function later as part of the SPDM
library, so expose it publicly.
Signed-off-by: Alistair Francis <alistair.francis@xxxxxxx>
---
rust/kernel/device.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs
index 2291d85b6849e..be89e9023b09f 100644
--- a/rust/kernel/device.rs
+++ b/rust/kernel/device.rs
@@ -262,7 +262,8 @@ pub unsafe fn drvdata_borrow<T>(&self) -> Pin<&T> {
impl<Ctx: DeviceContext> Device<Ctx> {
/// Obtain the raw `struct device *`.
- pub(crate) fn as_raw(&self) -> *mut bindings::device {
+ #[inline]
+ pub fn as_raw(&self) -> *mut bindings::device {
self.0.get()
}
--
2.56.0