build/patch/kernel/archive/sunxi-6.1/patches.megous/media-ov5640-Fix-sensor-probe-with-the-anti-click-patch.patch

47 lines
1.2 KiB
Diff

From c28bf075d09c0c97c0abe57001b3bf1f85790ed0 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Mon, 2 Jan 2023 10:10:25 +0100
Subject: [PATCH 390/391] media: ov5640: Fix sensor probe with the "anti-click"
patch
The focus anti-click patch got broken in rebase onto 6.1. Fix it.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/media/i2c/ov5640.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 86c9ec111b80..47524fdc94f7 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -4196,24 +4196,15 @@ static int ov5640_probe(struct i2c_client *client)
if (ret)
goto entity_cleanup;
- ret = ov5640_sensor_resume(dev);
- if (ret) {
- dev_err(dev, "failed to power on\n");
- goto entity_cleanup;
- }
-
- pm_runtime_get_noresume(dev);
- pm_runtime_enable(dev);
-
ret = v4l2_async_register_subdev_sensor(&sensor->sd);
if (ret) {
dev_err_probe(dev, ret, "Failed to register sensor\n");
goto err_pm_runtime;
}
+ pm_runtime_enable(dev);
pm_runtime_set_autosuspend_delay(dev, 1000);
pm_runtime_use_autosuspend(dev);
- pm_runtime_put_autosuspend(dev);
return 0;
--
2.35.3