drivers/staging/most/video/video.c
Source file repositories/reference/linux-study-clean/drivers/staging/most/video/video.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/most/video/video.c- Extension
.c- Size
- 13747 bytes
- Lines
- 589
- Domain
- Driver Families
- Bucket
- drivers/staging
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/slab.hlinux/init.hlinux/device.hlinux/suspend.hlinux/videodev2.hlinux/mutex.hmedia/v4l2-common.hmedia/v4l2-ioctl.hmedia/v4l2-event.hmedia/v4l2-device.hmedia/v4l2-ctrls.hmedia/v4l2-fh.hlinux/most.h
Detected Declarations
struct most_video_devstruct comp_fhfunction data_readyfunction comp_vdev_openfunction comp_vdev_closefunction list_for_each_entry_safefunction comp_vdev_readfunction comp_vdev_pollfunction comp_set_format_structfunction comp_set_formatfunction vidioc_querycapfunction vidioc_enum_fmt_vid_capfunction vidioc_g_fmt_vid_capfunction vidioc_try_fmt_vid_capfunction vidioc_s_fmt_vid_capfunction vidioc_g_stdfunction vidioc_enum_inputfunction vidioc_g_inputfunction vidioc_s_inputfunction comp_rx_datafunction comp_register_videodevfunction comp_unregister_videodevfunction comp_v4l2_dev_releasefunction comp_probe_channelfunction comp_disconnect_channelfunction comp_initfunction comp_exitfunction list_for_each_entry_safemodule init comp_init
Annotated Snippet
module_init(comp_init);
module_exit(comp_exit);
MODULE_DESCRIPTION("V4L2 Component Module for Mostcore");
MODULE_AUTHOR("Andrey Shvetsov <andrey.shvetsov@k2l.de>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `linux/init.h`, `linux/device.h`, `linux/suspend.h`, `linux/videodev2.h`, `linux/mutex.h`, `media/v4l2-common.h`.
- Detected declarations: `struct most_video_dev`, `struct comp_fh`, `function data_ready`, `function comp_vdev_open`, `function comp_vdev_close`, `function list_for_each_entry_safe`, `function comp_vdev_read`, `function comp_vdev_poll`, `function comp_set_format_struct`, `function comp_set_format`.
- Atlas domain: Driver Families / drivers/staging.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.