OSDN Git Service

media: i2c: imx219: Balance runtime PM use-count
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 11 Mar 2021 09:52:05 +0000 (10:52 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 6 Apr 2021 12:38:59 +0000 (14:38 +0200)
commitdd90caa0111e178b52b21e56364bc2244a3973b3
tree685bd9cdb0436a12f94444eae1d6f480c6e6ea17
parent745d4612d2c853c00abadbf69799c8aee7f99c39
media: i2c: imx219: Balance runtime PM use-count

Move incrementing/decrementing runtime PM count to
imx219_start_streaming()/imx219_stop_streaming() functions respectively.

This fixes an issue of unbalanced runtime PM count in resume callback
error path where streaming is stopped and runtime PM count is left
unbalanced.

Fixes: 1283b3b8f82b9 ("media: i2c: Add driver for Sony IMX219 sensor")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/imx219.c