]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: platform: fix remove_callback invariant comment
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Sat, 10 Jan 2026 11:51:56 +0000 (03:51 -0800)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 13 Jan 2026 11:35:06 +0000 (12:35 +0100)
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>
rust/kernel/platform.rs

index 8836ac46b0660c0c7368d9c71323b06729e84ffc..bdf89c8293fc0b33033b7d7ace758642d02d7f8d 100644 (file)
@@ -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