From: Hans de Goede Date: Fri, 20 Dec 2024 14:41:28 +0000 (+0100) Subject: media: ov08x40: Add missing ov08x40_identify_module() call on stream-start X-Git-Tag: v6.15-rc1~174^2~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebf185efadb71bd5344877be683895b6b18d7edf;p=thirdparty%2Fkernel%2Flinux.git media: ov08x40: Add missing ov08x40_identify_module() call on stream-start 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 Signed-off-by: Hans de Goede Fixes: b1a42fde6e07 ("media: ov08x40: Avoid sensor probing in D0 state") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/ov08x40.c b/drivers/media/i2c/ov08x40.c index 39430528f54f9..7d00740222c18 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.