Skip to content

Commit ca880c8

Browse files
WhatAmISupposedToPutHerejannau
authored andcommitted
rust: Only export module id tables if building as module
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
1 parent 53de4fb commit ca880c8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

rust/kernel/device_id.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ impl<T: RawDeviceId, U, const N: usize> IdTable<T, U> for IdArray<T, U, N> {
153153
macro_rules! module_device_table {
154154
($table_type: literal, $module_table_name:ident, $table_name:ident) => {
155155
#[rustfmt::skip]
156+
#[cfg(MODULE)]
156157
#[export_name =
157158
concat!("__mod_", $table_type, "__", stringify!($table_name), "_device_table")
158159
]

0 commit comments

Comments
 (0)