]> www.infradead.org Git - users/hch/misc.git/commitdiff
media: chips-media: wave5: Pass file pointer to wave5_cleanup_instance()
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 10 Aug 2025 01:30:03 +0000 (04:30 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 13 Aug 2025 06:33:33 +0000 (08:33 +0200)
In preparation for a tree-wide rework automated with coccinelle that
will need to access a struct file pointer in the
wave5_cleanup_instance() function, pass it from the callers. There is
not functional change yet.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/chips-media/wave5/wave5-helper.c
drivers/media/platform/chips-media/wave5/wave5-helper.h
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c

index 031dea0ee61c6c5afddf7ff47d67d85826f16d8d..ed8ff04a899da0a3c9e0f037dac2c9548c98920f 100644 (file)
@@ -27,7 +27,7 @@ const char *state_to_str(enum vpu_instance_state state)
        }
 }
 
-void wave5_cleanup_instance(struct vpu_instance *inst)
+void wave5_cleanup_instance(struct vpu_instance *inst, struct file *filp)
 {
        int i;
 
@@ -78,7 +78,7 @@ int wave5_vpu_release_device(struct file *filp,
                }
        }
 
-       wave5_cleanup_instance(inst);
+       wave5_cleanup_instance(inst, filp);
 
        return ret;
 }
index 9937fce553fc33000bd31abcfc6d7345f6f7e485..976a402e426ff329490717925a08a76d777cbe3e 100644 (file)
@@ -14,7 +14,7 @@
 #define MAX_FMTS       12
 
 const char *state_to_str(enum vpu_instance_state state);
-void wave5_cleanup_instance(struct vpu_instance *inst);
+void wave5_cleanup_instance(struct vpu_instance *inst, struct file *filp);
 int wave5_vpu_release_device(struct file *filp,
                             int (*close_func)(struct vpu_instance *inst, u32 *fail_res),
                             char *name);
index fd71f0c43ac37a0bb56f669d4b89d6054cb181d5..f3188d720ed3e183f3400816a9c939014213711d 100644 (file)
@@ -1840,7 +1840,7 @@ static int wave5_vpu_open_dec(struct file *filp)
        return 0;
 
 cleanup_inst:
-       wave5_cleanup_instance(inst);
+       wave5_cleanup_instance(inst, filp);
        return ret;
 }
 
index 1e5fc5f8b856c5329b2c6007649285a28749b6aa..b69a1206fa12c2ff5f3a32d269b8fd3b80a597aa 100644 (file)
@@ -1784,7 +1784,7 @@ static int wave5_vpu_open_enc(struct file *filp)
        return 0;
 
 cleanup_inst:
-       wave5_cleanup_instance(inst);
+       wave5_cleanup_instance(inst, filp);
        return ret;
 }