mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 02:53:16 -04:00
rust_binder: use LocalModule for THIS_MODULE
Replace the `THIS_MODULE` static reference in the binder fops with `this_module::<LocalModule>()`, consistent with the move of `THIS_MODULE` into the `ModuleMetadata` trait. Assisted-by: opencode:glm-5.2 Reviewed-by: Gary Guo <gary@garyguo.net> Acked-by: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Alvin Sun <alvin.sun@linux.dev> Link: https://patch.msgid.link/20260811-fix-fops-owner-v10-8-7e71776f9dbe@linux.dev Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
bindings::{self, seq_file},
|
||||
fs::File,
|
||||
list::{ListArc, ListArcSafe, ListLinksSelfPtr, TryNewListArc},
|
||||
module::this_module,
|
||||
prelude::*,
|
||||
seq_file::SeqFile,
|
||||
seq_print,
|
||||
@@ -318,7 +319,7 @@ unsafe impl<T> Sync for AssertSync<T> {}
|
||||
let zeroed_ops = unsafe { core::mem::MaybeUninit::zeroed().assume_init() };
|
||||
|
||||
let ops = kernel::bindings::file_operations {
|
||||
owner: THIS_MODULE.as_ptr(),
|
||||
owner: this_module::<LocalModule>().as_ptr(),
|
||||
poll: Some(rust_binder_poll),
|
||||
unlocked_ioctl: Some(rust_binder_ioctl),
|
||||
compat_ioctl: bindings::compat_ptr_ioctl,
|
||||
|
||||
Reference in New Issue
Block a user