@@ -215,24 +215,24 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
215215 // SAFETY: `__this_module` is constructed by the kernel at load time and will not be
216216 // freed until the module is unloaded.
217217 #[cfg(MODULE)]
218- static THIS_MODULE: kernel::ThisModule = unsafe {{
218+ static THIS_MODULE: :: kernel::ThisModule = unsafe {{
219219 extern \" C\" {{
220- static __this_module: kernel::types::Opaque<kernel::bindings::module>;
220+ static __this_module: :: kernel::types::Opaque<:: kernel::bindings::module>;
221221 }}
222222
223- kernel::ThisModule::from_ptr(__this_module.get())
223+ :: kernel::ThisModule::from_ptr(__this_module.get())
224224 }};
225225 #[cfg(not(MODULE))]
226- static THIS_MODULE: kernel::ThisModule = unsafe {{
227- kernel::ThisModule::from_ptr(core::ptr::null_mut())
226+ static THIS_MODULE: :: kernel::ThisModule = unsafe {{
227+ :: kernel::ThisModule::from_ptr(:: core::ptr::null_mut())
228228 }};
229229
230230 /// The `LocalModule` type is the type of the module created by `module!`,
231231 /// `module_pci_driver!`, `module_platform_driver!`, etc.
232232 type LocalModule = {type_};
233233
234- impl kernel::ModuleMetadata for {type_} {{
235- const NAME: &'static kernel::str::CStr = kernel::c_str!(\" {name}\" );
234+ impl :: kernel::ModuleMetadata for {type_} {{
235+ const NAME: &'static :: kernel::str::CStr = :: kernel::c_str!(\" {name}\" );
236236 }}
237237
238238 // Double nested modules, since then nobody can access the public items inside.
@@ -250,8 +250,8 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
250250 #[used]
251251 static __IS_RUST_MODULE: () = ();
252252
253- static mut __MOD: core::mem::MaybeUninit<{type_}> =
254- core::mem::MaybeUninit::uninit();
253+ static mut __MOD: :: core::mem::MaybeUninit<{type_}> =
254+ :: core::mem::MaybeUninit::uninit();
255255
256256 // Loadable modules need to export the `{{init,cleanup}}_module` identifiers.
257257 /// # Safety
@@ -262,7 +262,7 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
262262 #[doc(hidden)]
263263 #[no_mangle]
264264 #[link_section = \" .init.text\" ]
265- pub unsafe extern \" C\" fn init_module() -> kernel::ffi::c_int {{
265+ pub unsafe extern \" C\" fn init_module() -> :: kernel::ffi::c_int {{
266266 // SAFETY: This function is inaccessible to the outside due to the double
267267 // module wrapping it. It is called exactly once by the C side via its
268268 // unique name.
@@ -302,11 +302,12 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
302302 #[doc(hidden)]
303303 #[link_section = \" {initcall_section}\" ]
304304 #[used]
305- pub static __{name}_initcall: extern \" C\" fn() -> kernel::ffi::c_int = __{name}_init;
305+ pub static __{name}_initcall: extern \" C\" fn() -> ::kernel::ffi::c_int =
306+ __{name}_init;
306307
307308 #[cfg(not(MODULE))]
308309 #[cfg(CONFIG_HAVE_ARCH_PREL32_RELOCATIONS)]
309- core::arch::global_asm!(
310+ :: core::arch::global_asm!(
310311 r#\" .section \" {initcall_section}\" , \" a\"
311312 __{name}_initcall:
312313 .long __{name}_init - .
@@ -317,7 +318,7 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
317318 #[cfg(not(MODULE))]
318319 #[doc(hidden)]
319320 #[no_mangle]
320- pub extern \" C\" fn __{name}_init() -> kernel::ffi::c_int {{
321+ pub extern \" C\" fn __{name}_init() -> :: kernel::ffi::c_int {{
321322 // SAFETY: This function is inaccessible to the outside due to the double
322323 // module wrapping it. It is called exactly once by the C side via its
323324 // placement above in the initcall section.
@@ -340,9 +341,9 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
340341 /// # Safety
341342 ///
342343 /// This function must only be called once.
343- unsafe fn __init() -> kernel::ffi::c_int {{
344+ unsafe fn __init() -> :: kernel::ffi::c_int {{
344345 let initer =
345- <{type_} as kernel::InPlaceModule>::init(&super::super::THIS_MODULE);
346+ <{type_} as :: kernel::InPlaceModule>::init(&super::super::THIS_MODULE);
346347 // SAFETY: No data race, since `__MOD` can only be accessed by this module
347348 // and there only `__init` and `__exit` access it. These functions are only
348349 // called once and `__exit` cannot be called before or during `__init`.
0 commit comments