From bd8448f732f15b4b160fa8fe200305240c704deb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20S=C3=B6derlund?= Date: Tue, 23 May 2017 21:15:36 -0300 Subject: [PATCH] [media] rcar-vin: refactor and fold in function after stall handling rework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit With the driver stopping and starting the stream each time the driver is stalled rvin_capture_off() can be folded in to the only caller. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/rcar-vin/rcar-dma.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c index ae4febe..b136844 100644 --- a/drivers/media/platform/rcar-vin/rcar-dma.c +++ b/drivers/media/platform/rcar-vin/rcar-dma.c @@ -397,12 +397,6 @@ static void rvin_capture_on(struct rvin_dev *vin) rvin_write(vin, VNFC_S_FRAME, VNFC_REG); } -static void rvin_capture_off(struct rvin_dev *vin) -{ - /* Set continuous & single transfer off */ - rvin_write(vin, 0, VNFC_REG); -} - static int rvin_capture_start(struct rvin_dev *vin) { struct rvin_buffer *buf, *node; @@ -436,7 +430,8 @@ static int rvin_capture_start(struct rvin_dev *vin) static void rvin_capture_stop(struct rvin_dev *vin) { - rvin_capture_off(vin); + /* Set continuous & single transfer off */ + rvin_write(vin, 0, VNFC_REG); /* Disable module */ rvin_write(vin, rvin_read(vin, VNMC_REG) & ~VNMC_ME, VNMC_REG); -- 2.7.4