From: Hans de Goede <hdego...@redhat.com>

media: ov08x40: Add missing ov08x40_identify_module() call on stream-start

upstream status: Accepted in media subsystem co-maintainer tree:
https://git.linuxtv.org/sailus/media_tree.git/log/drivers/media/i2c/ov08x40.c?h=devel
(this tree gets rebased before merging so no git hash)

The driver might skip the ov08x40_identify_module() on probe() based on
the acpi_dev_state_d0() check done in probe().

If the ov08x40_identify_module() call is skipped on probe() it should
be done on the first stream start. Add the missing call.

Note ov08x40_identify_module() will only do something on its first call,
subsequent calls are no-ops.

Tested-by: Bryan O'Donoghue <bryan.odonog...@linaro.org>
Signed-off-by: Hans de Goede <hdego...@redhat.com>
Fixes: b1a42fde6e07 ("media: ov08x40: Avoid sensor probing in D0 state")
Cc: sta...@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com>

diff --git a/drivers/media/i2c/ov08x40.c b/drivers/media/i2c/ov08x40.c
index blahblah..blahblah 100644
--- a/drivers/media/i2c/ov08x40.c
+++ b/drivers/media/i2c/ov08x40.c
@@ -1973,6 +1973,10 @@ static int ov08x40_set_stream(struct v4l2_subdev *sd, 
int enable)
                if (ret < 0)
                        goto err_unlock;
 
+               ret = ov08x40_identify_module(ov08x);
+               if (ret)
+                       goto err_rpm_put;
+
                /*
                 * Apply default & customized values
                 * and then start streaming.

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3671

-- 
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to