mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
rust: platform: fix remove_callback invariant comment
Correct copy-paste errors where remove_callback safety invariants incorrectly referenced probe_callback(). Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20260110115159.2313116-1-alok.a.tiwari@oracle.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
committed by
Danilo Krummrich
parent
601cd264a3
commit
585e8a26ab
@@ -103,7 +103,7 @@ impl<T: Driver + 'static> Adapter<T> {
|
||||
// SAFETY: The platform bus only ever calls the remove callback with a valid pointer to a
|
||||
// `struct platform_device`.
|
||||
//
|
||||
// INVARIANT: `pdev` is valid for the duration of `probe_callback()`.
|
||||
// INVARIANT: `pdev` is valid for the duration of `remove_callback()`.
|
||||
let pdev = unsafe { &*pdev.cast::<Device<device::CoreInternal>>() };
|
||||
|
||||
// SAFETY: `remove_callback` is only ever called after a successful call to
|
||||
|
||||
Reference in New Issue
Block a user