]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: firmware: introduce `firmware::ModInfoBuilder`
authorDanilo Krummrich <dakr@kernel.org>
Thu, 6 Mar 2025 22:23:28 +0000 (23:23 +0100)
committerDanilo Krummrich <dakr@kernel.org>
Sun, 9 Mar 2025 18:21:08 +0000 (19:21 +0100)
commitef476b0dd9ddfdc34a455408651e7c7bd20b4efe
tree56341a5347f2029b5557cdd7a98d8454d6a78c0b
parentd4245284c8c915107f003a15a20b9abfd40be3ff
rust: firmware: introduce `firmware::ModInfoBuilder`

The `firmware` field of the `module!` only accepts literal strings,
which is due to the fact that it is implemented as a proc macro.

Some drivers require a lot of firmware files (such as nova-core) and
hence benefit from more flexibility composing firmware path strings.

The `firmware::ModInfoBuilder` is a helper component to flexibly compose
firmware path strings for the .modinfo section in const context.

It is meant to be used in combination with `kernel::module_firmware!`.

Co-developed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20250306222336.23482-3-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/firmware.rs