Re: [PATCH] rust: serdev: use ThisModule::as_ptr() instead of field access
From: Gary Guo
Date: Thu Aug 13 2026 - 12:14:17 EST
On Thu Aug 13, 2026 at 4:24 PM BST, Danilo Krummrich wrote:
> 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@xxxxxxxxx/ [1]
> Closes: https://lore.kernel.org/all/DKNAS52KYWLD.M15VEC6U0F6R@xxxxxxxxxx/
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
> ---
> rust/kernel/serdev.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)