From 2f64c8745d4217a3375648c0e3af0f3ab0765a5d Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Wed, 24 Apr 2024 00:00:31 +0200
Subject: media: ov5648: Fix call to pm_runtime_set_suspended

It should be done when RPM is disabled.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 drivers/media/i2c/ov5648.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
index 4b86d2631bd1..c691e235388a 100644
--- a/drivers/media/i2c/ov5648.c
+++ b/drivers/media/i2c/ov5648.c
@@ -2566,8 +2566,8 @@ static int ov5648_probe(struct i2c_client *client)
 
 	/* Runtime PM */
 
-	pm_runtime_enable(sensor->dev);
 	pm_runtime_set_suspended(sensor->dev);
+	pm_runtime_enable(sensor->dev);
 
 	/* V4L2 subdev register */
 
-- 
2.35.3

