video_set_drvdata(9)
πΈ video_set_drvdata(9) πΈ
okay so bestie, welcome to the Kernel API Manual β yes we're in kernel land today, and no, it's not scary, i promise π«Ά this one's a tiny little function that just... sets a pointer. that's it. that's the whole vibe.
β¨ NAME β¨
video_set_drvdata β sets private data from &struct video_device.
literally just attaches your own private data pointer to a video device. iconic, low-effort, does exactly what it says on the tin π
π SYNOPSIS π
void video_set_drvdata (struct video_device *vdev , void *data );
no return value, no drama, no error paths. she just does it β¨
π ARGUMENTS π
vdevβ pointer tostruct video_device. this is the video device you're stuffing your data into, bestie π₯dataβ private data pointer. your very ownvoid *of mystery and intrigue β whatever you hand over is what gets stored π
π¦ SEE ALSO π¦
the kernel file ./include/media/v4l2-dev.h is where the lore lives, and honestly the whole friend group is here β go say hi π
enum vfl_devnode_type(9)enum vfl_devnode_direction(9)enum v4l2_video_device_flags(9)struct v4l2_prio_state(9)v4l2_prio_init(9)v4l2_prio_change(9)v4l2_prio_open(9)v4l2_prio_close(9)v4l2_prio_max(9)v4l2_prio_check(9)struct v4l2_file_operations(9)struct video_device(9)media_entity_to_video_device(9)to_video_device(9)__video_register_device(9)video_register_device(9)video_register_device_no_warn(9)video_unregister_device(9)video_device_alloc(9)video_device_release(9)video_device_release_empty(9)v4l2_disable_ioctl(9)video_get_drvdata(9)video_devdata(9)video_drvdata(9)video_device_node_name(9)video_is_registered(9)v4l2_debugfs_root(9)video_device_pipeline_start(9)__video_device_pipeline_start(9)video_device_pipeline_stop(9)__video_device_pipeline_stop(9)video_device_pipeline_alloc_start(9)video_device_pipeline(9)
like yes that's a lot of friends but every single one of them is invited, no cap π
ngl this page is short because the function is short β set the data, get the data later with video_get_drvdata(9), and go live your life π
okay that's the whole page, bestie!! source is ./include/media, dated October 2026, and it's the video_set_drvdata(9) page β stay hydrated, read your headers, and slay your driver π§π periodt β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms