media_request_get_by_fd(9)
π media_request_get_by_fd(9) π
okay bestie, weβre in the Kernel API Manual and this page is about grabbing a media request by its fd β itβs giving βyou have a file descriptor, now get the requestβ energy. π¦β¨
πΈ NAME πΈ
media_request_get_by_fd β get a media request by fd. Literally what it says on the tin. No cap. π
β¨ SYNOPSIS β¨
struct media_request * media_request_get_by_fd (struct media_device
*mdev , int request_fd );
π ARGUMENTS π
mdevβ the media device this request belongs to. Like, whose request is it? This deviceβs request. π«Άrequest_fdβ the file descriptor of the request. The fd in question, bestie. π₯
π DESCRIPTION π
okay so hereβs the tea: this function gets the request represented by request_fd that is owned by the media device. π§
- If requests are not supported by this driver, it returns a
-EBADRerror pointer. Not the vibe, but important. π - If the request was not found, it returns
-EINVAL. Bestie, check that fd. π - If the request is found, you get the pointer to the request β but listen, the caller will have to call
media_request_putwhen it finished using the request. Thatβs the cleanup rule, periodt. π β¨
reminder: the caller will have to call media_request_put when it finished using the request. donβt leave it hanging, okay? π«Ά
π SEE ALSO π
- Kernel file
./include/media/media-request.h enum media_request_state(9)struct media_request(9)media_request_lock_for_access(9)media_request_unlock_for_access(9)media_request_lock_for_update(9)media_request_unlock_for_update(9)media_request_get(9)media_request_put(9)media_request_alloc(9)media_request_mark_manual_completion(9)media_request_manual_complete(9)struct media_request_object_ops(9)struct media_request_object(9)media_request_object_get(9)media_request_object_put(9)media_request_object_find(9)media_request_object_init(9)media_request_object_bind(9)media_request_object_unbind(9)media_request_object_complete(9)
mwah π thatβs the whole page, bestie β source/version is ./include/media and the date is October 2026. stay hydrated, remember media_request_put, and slay your media requests π«Άππ
π¦ 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