mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
rust: serdev: use ThisModule::as_ptr() instead of field access
The THIS_MODULE series [1] applied to rust-next moved ThisModule from lib.rs into a module.rs submodule, making the tuple struct field private outside the module. This breaks the module.0 field access in serdev in driver-core-next. Update the call to __serdev_device_driver_register() to use the public module.as_ptr() accessor to fix the build. Link: https://lore.kernel.org/all/20260811-fix-fops-owner-v10-0-7e71776f9dbe@linux.dev/ [1] Closes: https://lore.kernel.org/all/DKNAS52KYWLD.M15VEC6U0F6R@kernel.org/ Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Markus Probst <markus.probst@posteo.de> Link: https://patch.msgid.link/20260813152444.514580-1-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
parent
dbaafe9cc5
commit
ddca0cd800
|
|
@ -87,7 +87,7 @@ unsafe fn register(
|
|||
}
|
||||
|
||||
// SAFETY: `sdrv` is guaranteed to be a valid `DriverType`.
|
||||
to_result(unsafe { bindings::__serdev_device_driver_register(sdrv.get(), module.0) })
|
||||
to_result(unsafe { bindings::__serdev_device_driver_register(sdrv.get(), module.as_ptr()) })
|
||||
}
|
||||
|
||||
unsafe fn unregister(sdrv: &Opaque<Self::DriverType>) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user