We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0582009 commit 8352c3dCopy full SHA for 8352c3d
1 file changed
rust/kernel/platform.rs
@@ -216,6 +216,10 @@ impl Device {
216
unsafe { container_of!(self.dev.as_raw(), bindings::platform_device, dev) }.cast_mut()
217
}
218
219
+ pub fn get_device(&self) -> ARef<device::Device> {
220
+ self.dev.clone()
221
+ }
222
+
223
/// Sets the DMA masks (normal and coherent) for a platform device.
224
pub fn set_dma_masks(&mut self, mask: u64) -> Result {
225
// SAFETY: `self.ptr` is valid by the type invariant.
0 commit comments