Skip to content

Commit e0a3d4d

Browse files
committed
HACK: rust: of: add as_raw()
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent c6576be commit e0a3d4d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

rust/kernel/of.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ impl Node {
9797
unsafe { &*self.raw_node }
9898
}
9999

100+
/// Returns a reference to the underlying C `device_node` structure.
101+
pub unsafe fn as_raw(&self) -> *mut bindings::device_node {
102+
self.raw_node
103+
}
104+
100105
/// Returns the name of the node.
101106
pub fn name(&self) -> &CStr {
102107
// SAFETY: The lifetime of the `CStr` is the same as the lifetime of this `Node`.

0 commit comments

Comments
 (0)