We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 576e5fb commit 43abfcaCopy full SHA for 43abfca
1 file changed
rust/kernel/of.rs
@@ -100,6 +100,12 @@ impl Node {
100
unsafe { &*self.raw_node }
101
}
102
103
+ /// Returns a reference to the underlying C `device_node` structure.
104
+ pub fn as_raw(&self) -> *mut bindings::device_node {
105
+ // SAFETY: `raw_node` is valid per the type invariant.
106
+ unsafe { self.raw_node }
107
+ }
108
+
109
/// Returns the name of the node.
110
pub fn name(&self) -> &CStr {
111
// SAFETY: The lifetime of the `CStr` is the same as the lifetime of this `Node`.
0 commit comments