From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: "Poluri, Sarat Chandra" Date: Fri, 12 Apr 2019 18:27:14 +0000 Subject: [PATCH] media: ici: Fix warning when stream_start fails. Pipeline set power on and off should be done in open and release. Not in stream_on and stream_off. Change-Id: Ic403faaaa9c341cc8b5c655908702715139b857e Tracked-On: PKT-2287 Tracked-On: HSDES-1409261137 Signed-off-by: Poluri, Sarat Chandra --- drivers/media/pci/intel/ici/ici-isys-stream.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/intel/ici/ici-isys-stream.c b/drivers/media/pci/intel/ici/ici-isys-stream.c index 1384fc3..a01e135 100644 --- a/drivers/media/pci/intel/ici/ici-isys-stream.c +++ b/drivers/media/pci/intel/ici/ici-isys-stream.c @@ -898,8 +898,6 @@ static int ici_isys_stream_on(struct file *file, void *fh) return -ENODEV; } - pipeline_set_power(as, 1); - mutex_lock(&as->isys->stream_mutex); ip->source = ip->asd_source->source; @@ -946,7 +944,7 @@ static int ici_isys_stream_on(struct file *file, void *fh) out_requeue: mutex_unlock(&as->isys->stream_mutex); ici_isys_frame_buf_stream_cancel(as); - pipeline_set_power(as, 0); + return rval; } @@ -965,7 +963,7 @@ static int ici_isys_stream_off(struct file *file, void *fh) ici_isys_frame_buf_short_packet_destroy(as); ici_isys_frame_buf_stream_cancel(as); - pipeline_set_power(as, 0); + return 0; } @@ -1116,6 +1114,7 @@ static int stream_fop_open(struct inode *inode, struct file *file) return rval; } + pipeline_set_power(as, 1); mutex_lock(&isys->mutex); ipu_configure_spc(adev->isp, @@ -1206,8 +1205,9 @@ static int stream_fop_release(struct inode *inode, struct file *file) } mutex_unlock(&as->isys->mutex); - + pipeline_set_power(as, 0); pm_runtime_put(&as->isys->adev->dev); + return ret; } -- https://clearlinux.org