From: Bryan O'Donoghue Date: Fri, 15 Apr 2022 11:59:52 +0000 (+0200) Subject: media: i2c: imx412: Fix power_off ordering X-Git-Tag: v6.1-rc5~1294^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a199694c6a1519522ec73a4571f68abe9f13d5d;p=platform%2Fkernel%2Flinux-starfive.git media: i2c: imx412: Fix power_off ordering The enable path does - gpio - clock The disable path does - gpio - clock Fix the order on the power-off path so that power-off and power-on have the same ordering for clock and gpio. Fixes: 9214e86c0cc1 ("media: i2c: Add imx412 camera sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Bryan O'Donoghue Reviewed-by: Jacopo Mondi Reviewed-by: Daniele Alessandrelli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/imx412.c b/drivers/media/i2c/imx412.c index e6be6b4250f5..84279a680873 100644 --- a/drivers/media/i2c/imx412.c +++ b/drivers/media/i2c/imx412.c @@ -1040,10 +1040,10 @@ static int imx412_power_off(struct device *dev) struct v4l2_subdev *sd = dev_get_drvdata(dev); struct imx412 *imx412 = to_imx412(sd); - gpiod_set_value_cansleep(imx412->reset_gpio, 1); - clk_disable_unprepare(imx412->inclk); + gpiod_set_value_cansleep(imx412->reset_gpio, 1); + return 0; }