diff options
| author | Jiri Kosina <jkosina@suse.com> | 2025-12-02 14:52:36 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-12-02 14:52:36 +0100 |
| commit | 1a2f09ae11b4657d49df6fa86744795f99c2ee27 (patch) | |
| tree | cb178345ab4408702ec6de5fe9910924bfae96d7 /rust/kernel/device.rs | |
| parent | 59c752c59f12cfb56bbc0b213a4d24407959688a (diff) | |
| parent | 3b86c87f8dcbb8ba3b00d7adf7ccfff086f0f23e (diff) | |
Merge branch 'for-6.19/hid-bpf' into for-linus
- Bring in a couple more BPF drivers for various devices (Benjamin Tissoires)
Diffstat (limited to 'rust/kernel/device.rs')
| -rw-r--r-- | rust/kernel/device.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs index 1321e6f0b53c..a849b7dde2fd 100644 --- a/rust/kernel/device.rs +++ b/rust/kernel/device.rs @@ -251,7 +251,7 @@ impl<Ctx: DeviceContext> Device<Ctx> { /// Returns a reference to the parent device, if any. #[cfg_attr(not(CONFIG_AUXILIARY_BUS), expect(dead_code))] - pub(crate) fn parent(&self) -> Option<&Self> { + pub(crate) fn parent(&self) -> Option<&Device> { // SAFETY: // - By the type invariant `self.as_raw()` is always valid. // - The parent device is only ever set at device creation. @@ -264,7 +264,7 @@ impl<Ctx: DeviceContext> Device<Ctx> { // - Since `parent` is not NULL, it must be a valid pointer to a `struct device`. // - `parent` is valid for the lifetime of `self`, since a `struct device` holds a // reference count of its parent. - Some(unsafe { Self::from_raw(parent) }) + Some(unsafe { Device::from_raw(parent) }) } } |
