[PATCH v5 08/23] rust: device: Expose Device from_raw() publically

From: alistair23

Date: Tue Oct 27 2026 - 01:32:02 EST


From: Alistair Francis <alistair.francis@xxxxxxx>

We are going to call the from_raw() function later as part of the SPDM
library, so expose it publically.

Signed-off-by: Alistair Francis <alistair.francis@xxxxxxx>
---
rust/kernel/device.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs
index 2291d85b6849e..a355ac9803410 100644
--- a/rust/kernel/device.rs
+++ b/rust/kernel/device.rs
@@ -262,7 +262,7 @@ 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 {
+ pub fn as_raw(&self) -> *mut bindings::device {
self.0.get()
}

--
2.56.0