diff options
Diffstat (limited to 'drivers/media/platform/s5p-fimc/fimc-lite.c')
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-lite.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c index 70bcf39de87..1b309a72f09 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite.c +++ b/drivers/media/platform/s5p-fimc/fimc-lite.c | |||
@@ -491,8 +491,7 @@ static int fimc_lite_close(struct file *file) | |||
491 | struct fimc_lite *fimc = video_drvdata(file); | 491 | struct fimc_lite *fimc = video_drvdata(file); |
492 | int ret; | 492 | int ret; |
493 | 493 | ||
494 | if (mutex_lock_interruptible(&fimc->lock)) | 494 | mutex_lock(&fimc->lock); |
495 | return -ERESTARTSYS; | ||
496 | 495 | ||
497 | if (--fimc->ref_count == 0 && fimc->out_path == FIMC_IO_DMA) { | 496 | if (--fimc->ref_count == 0 && fimc->out_path == FIMC_IO_DMA) { |
498 | clear_bit(ST_FLITE_IN_USE, &fimc->state); | 497 | clear_bit(ST_FLITE_IN_USE, &fimc->state); |
@@ -1253,7 +1252,9 @@ static int fimc_lite_subdev_registered(struct v4l2_subdev *sd) | |||
1253 | q->buf_struct_size = sizeof(struct flite_buffer); | 1252 | q->buf_struct_size = sizeof(struct flite_buffer); |
1254 | q->drv_priv = fimc; | 1253 | q->drv_priv = fimc; |
1255 | 1254 | ||
1256 | vb2_queue_init(q); | 1255 | ret = vb2_queue_init(q); |
1256 | if (ret < 0) | ||
1257 | return ret; | ||
1257 | 1258 | ||
1258 | fimc->vd_pad.flags = MEDIA_PAD_FL_SINK; | 1259 | fimc->vd_pad.flags = MEDIA_PAD_FL_SINK; |
1259 | ret = media_entity_init(&vfd->entity, 1, &fimc->vd_pad, 0); | 1260 | ret = media_entity_init(&vfd->entity, 1, &fimc->vd_pad, 0); |
@@ -1261,10 +1262,12 @@ static int fimc_lite_subdev_registered(struct v4l2_subdev *sd) | |||
1261 | return ret; | 1262 | return ret; |
1262 | 1263 | ||
1263 | video_set_drvdata(vfd, fimc); | 1264 | video_set_drvdata(vfd, fimc); |
1265 | fimc->pipeline_ops = v4l2_get_subdev_hostdata(sd); | ||
1264 | 1266 | ||
1265 | ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1); | 1267 | ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1); |
1266 | if (ret < 0) { | 1268 | if (ret < 0) { |
1267 | media_entity_cleanup(&vfd->entity); | 1269 | media_entity_cleanup(&vfd->entity); |
1270 | fimc->pipeline_ops = NULL; | ||
1268 | return ret; | 1271 | return ret; |
1269 | } | 1272 | } |
1270 | 1273 | ||
@@ -1283,6 +1286,7 @@ static void fimc_lite_subdev_unregistered(struct v4l2_subdev *sd) | |||
1283 | if (video_is_registered(&fimc->vfd)) { | 1286 | if (video_is_registered(&fimc->vfd)) { |
1284 | video_unregister_device(&fimc->vfd); | 1287 | video_unregister_device(&fimc->vfd); |
1285 | media_entity_cleanup(&fimc->vfd.entity); | 1288 | media_entity_cleanup(&fimc->vfd.entity); |
1289 | fimc->pipeline_ops = NULL; | ||
1286 | } | 1290 | } |
1287 | } | 1291 | } |
1288 | 1292 | ||