diff options
Diffstat (limited to 'drivers/media/platform/vimc')
-rw-r--r-- | drivers/media/platform/vimc/vimc-capture.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/platform/vimc/vimc-capture.c b/drivers/media/platform/vimc/vimc-capture.c index ea869631a3f6..54fda5b29dd0 100644 --- a/drivers/media/platform/vimc/vimc-capture.c +++ b/drivers/media/platform/vimc/vimc-capture.c | |||
@@ -338,6 +338,15 @@ static const struct media_entity_operations vimc_cap_mops = { | |||
338 | .link_validate = vimc_link_validate, | 338 | .link_validate = vimc_link_validate, |
339 | }; | 339 | }; |
340 | 340 | ||
341 | static void vimc_cap_release(struct video_device *vdev) | ||
342 | { | ||
343 | struct vimc_cap_device *vcap = | ||
344 | container_of(vdev, struct vimc_cap_device, vdev); | ||
345 | |||
346 | vimc_pads_cleanup(vcap->ved.pads); | ||
347 | kfree(vcap); | ||
348 | } | ||
349 | |||
341 | static void vimc_cap_comp_unbind(struct device *comp, struct device *master, | 350 | static void vimc_cap_comp_unbind(struct device *comp, struct device *master, |
342 | void *master_data) | 351 | void *master_data) |
343 | { | 352 | { |
@@ -348,8 +357,6 @@ static void vimc_cap_comp_unbind(struct device *comp, struct device *master, | |||
348 | vb2_queue_release(&vcap->queue); | 357 | vb2_queue_release(&vcap->queue); |
349 | media_entity_cleanup(ved->ent); | 358 | media_entity_cleanup(ved->ent); |
350 | video_unregister_device(&vcap->vdev); | 359 | video_unregister_device(&vcap->vdev); |
351 | vimc_pads_cleanup(vcap->ved.pads); | ||
352 | kfree(vcap); | ||
353 | } | 360 | } |
354 | 361 | ||
355 | static void *vimc_cap_process_frame(struct vimc_ent_device *ved, | 362 | static void *vimc_cap_process_frame(struct vimc_ent_device *ved, |
@@ -467,7 +474,7 @@ static int vimc_cap_comp_bind(struct device *comp, struct device *master, | |||
467 | vdev = &vcap->vdev; | 474 | vdev = &vcap->vdev; |
468 | vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; | 475 | vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; |
469 | vdev->entity.ops = &vimc_cap_mops; | 476 | vdev->entity.ops = &vimc_cap_mops; |
470 | vdev->release = video_device_release_empty; | 477 | vdev->release = vimc_cap_release; |
471 | vdev->fops = &vimc_cap_fops; | 478 | vdev->fops = &vimc_cap_fops; |
472 | vdev->ioctl_ops = &vimc_cap_ioctl_ops; | 479 | vdev->ioctl_ops = &vimc_cap_ioctl_ops; |
473 | vdev->lock = &vcap->lock; | 480 | vdev->lock = &vcap->lock; |