Skip to content
Commit 39867fec authored by Asahi Lina's avatar Asahi Lina Committed by Miguel Ojeda
Browse files

rust: macros: Allow specifying multiple module aliases



Modules can (and usually do) have multiple alias tags, in order to
specify multiple possible device matches for autoloading. Allow this by
changing the alias ModuleInfo field to an Option<Vec<String>>.

Note: For normal device IDs this is autogenerated by modpost (which is
not properly integrated with Rust support yet), so it is useful to be
able to manually add device match aliases for now, and should still be
useful in the future for corner cases that modpost does not handle.

This pulls in the expect_group() helper from the rfl/rust branch
(with credit to authors).

Co-developed-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Co-developed-by: default avatarFinn Behrens <me@kloenk.dev>
Signed-off-by: default avatarFinn Behrens <me@kloenk.dev>
Co-developed-by: default avatarSumera Priyadarsini <sylphrenadin@gmail.com>
Signed-off-by: default avatarSumera Priyadarsini <sylphrenadin@gmail.com>
Reviewed-by: default avatarVincenzo Palazzo <vincenzopalazzodev@gmail.com>
Signed-off-by: default avatarAsahi Lina <lina@asahilina.net>
Link: https://lore.kernel.org/r/20230224-rust-macros-v2-1-7396e8b7018d@asahilina.net
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 318c3cc8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment