diff options
| author | Alvin Sun <alvin.sun@linux.dev> | 2026-08-11 14:39:50 +0800 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-08-12 09:36:26 +0200 |
| commit | d1ea160c4fbb439e91e544d44c8bc44ef5f29a7b (patch) | |
| tree | 45961b7b1f470f9c8b8625af84a16cb6377231b1 /drivers/android | |
| parent | 003c01b2f0bad8c8c515928938ce4e7135603884 (diff) | |
| download | linux-d1ea160c4fbb439e91e544d44c8bc44ef5f29a7b.tar.gz linux-d1ea160c4fbb439e91e544d44c8bc44ef5f29a7b.zip | |
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>
Diffstat (limited to 'drivers/android')
| -rw-r--r-- | drivers/android/binder/rust_binder_main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/android/binder/rust_binder_main.rs b/drivers/android/binder/rust_binder_main.rs index dc1941cd2407..d6ceebbd5f94 100644 --- a/drivers/android/binder/rust_binder_main.rs +++ b/drivers/android/binder/rust_binder_main.rs @@ -17,6 +17,7 @@ use kernel::{ bindings::{self, seq_file}, fs::File, list::{ListArc, ListArcSafe, ListLinksSelfPtr, TryNewListArc}, + module::this_module, prelude::*, seq_file::SeqFile, seq_print, @@ -318,7 +319,7 @@ pub static rust_binder_fops: AssertSync<kernel::bindings::file_operations> = { 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, |
