Lines Matching refs:ctx
30 * @ctx: The HID-BPF context
43 __weak noinline int hid_bpf_device_event(struct hid_bpf_ctx *ctx)
53 .ctx = {
78 if (ret > ctx_kern.ctx.allocated_size)
92 * @ctx: The HID-BPF context
103 __weak noinline int hid_bpf_rdesc_fixup(struct hid_bpf_ctx *ctx)
112 .ctx = {
119 ctx_kern.data = kzalloc(ctx_kern.ctx.allocated_size, GFP_KERNEL);
130 if (ret > ctx_kern.ctx.allocated_size)
147 * hid_bpf_get_data - Get the kernel memory pointer associated with the context @ctx
149 * @ctx: The HID-BPF context
156 hid_bpf_get_data(struct hid_bpf_ctx *ctx, unsigned int offset, const size_t rdwr_buf_size)
160 if (!ctx)
163 ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
165 if (rdwr_buf_size + offset > ctx->allocated_size)
363 ctx_kern->ctx.hid = hdev;
365 return &ctx_kern->ctx;
369 * hid_bpf_release_context - Release the previously allocated context @ctx
371 * @ctx: the HID-BPF context to release
375 hid_bpf_release_context(struct hid_bpf_ctx *ctx)
380 ctx_kern = container_of(ctx, struct hid_bpf_ctx_kern, ctx);
381 hid = (struct hid_device *)ctx_kern->ctx.hid; /* ignore const */
392 * @ctx: the HID-BPF context previously allocated in hid_bpf_allocate_context()
401 hid_bpf_hw_request(struct hid_bpf_ctx *ctx, __u8 *buf, size_t buf__sz,
412 if (!ctx || !hid_bpf_ops || !buf)
439 hdev = (struct hid_device *)ctx->hid; /* discard const */