diff mbox series

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

Message ID 20230406215615.122099-2-daniel.almeida@collabora.com
State New
Headers show
Series Initial Rust V4L2 support | expand

Commit Message

Daniel Almeida April 6, 2023, 9:56 p.m. UTC
As part of the initial rust v4l2 support, add the media module
to the kernel crate.

Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
---
 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 mbox series

Patch

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