[PATCH 1/6] rust: media: add the media module

From: Daniel Almeida
Date: Thu Apr 06 2023 - 17:58:11 EST


As part of the initial rust v4l2 support, add the media module
to the kernel crate.

Signed-off-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
---
rust/kernel/lib.rs | 2 ++
rust/kernel/media/mod.rs | 5 +++++
rust/kernel/media/v4l2/mod.rs | 3 +++
3 files changed, 10 insertions(+)
create mode 100644 rust/kernel/media/mod.rs
create mode 100644 rust/kernel/media/v4l2/mod.rs

diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index c20b37e88ab2..d7e8f3297405 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -48,6 +48,8 @@ pub mod types;
#[doc(hidden)]
pub use bindings;
pub use macros;
+#[cfg(CONFIG_MEDIA_SUPPORT)]
+pub mod media;

#[cfg(CONFIG_ARM_AMBA)]
pub mod amba;
diff --git a/rust/kernel/media/mod.rs b/rust/kernel/media/mod.rs
new file mode 100644
index 000000000000..342e66382719
--- /dev/null
+++ b/rust/kernel/media/mod.rs
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0
+
+//! Media subsystem
+
+pub mod v4l2;
diff --git a/rust/kernel/media/v4l2/mod.rs b/rust/kernel/media/v4l2/mod.rs
new file mode 100644
index 000000000000..068dd9b4863d
--- /dev/null
+++ b/rust/kernel/media/v4l2/mod.rs
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+
+//! Abstractions for include/media/v4l2-*.h
--
2.40.0