drivers/media/test-drivers/visl/visl-video.c

Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/visl/visl-video.c

File Facts

System
Linux kernel
Corpus path
drivers/media/test-drivers/visl/visl-video.c
Extension
.c
Size
20416 bytes
Lines
804
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: implementation source
Status
source 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.

Dependency Surface

Detected Declarations

Annotated Snippet

if (vb2_request_object_is_buffer(obj)) {
			vb = container_of(obj, struct vb2_buffer, req_obj);
			ctx = vb2_get_drv_priv(vb->vb2_queue);

			break;
		}
	}

	if (!ctx)
		return -ENOENT;

	count = vb2_request_buffer_cnt(req);
	if (!count) {
		v4l2_err(&ctx->dev->v4l2_dev,
			 "No buffer was provided with the request\n");
		return -ENOENT;
	} else if (count > 1) {
		v4l2_err(&ctx->dev->v4l2_dev,
			 "More than one buffer was provided with the request\n");
		return -EINVAL;
	}

	return vb2_request_validate(req);
}

Annotation

Implementation Notes