From: Mehdi Djait Date: Thu, 26 Jun 2025 13:34:08 +0000 (+0200) Subject: media: i2c: imx415: Use the v4l2 helper for obtaining the clock X-Git-Tag: v6.18-rc1~133^2~344 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=180ea10775458a2f46e1f300f3765da03a1d9362;p=thirdparty%2Fkernel%2Fstable.git media: i2c: imx415: Use the v4l2 helper for obtaining the clock devm_clk_get() fails on ACPI-based platforms, where firmware does not provide a direct reference to the clock producer. Replace devm_clk_get() with the new v4l2 helper devm_v4l2_sensor_clk_get() that works on both DT- and ACPI-based platforms to retrieve a reference to the clock producer from firmware. Reviewed-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Mehdi Djait Reviewed-by: Michael Riesch Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c index 278e743646ea1..2e206a671ed31 100644 --- a/drivers/media/i2c/imx415.c +++ b/drivers/media/i2c/imx415.c @@ -1251,7 +1251,7 @@ static int imx415_parse_hw_config(struct imx415 *sensor) return dev_err_probe(sensor->dev, PTR_ERR(sensor->reset), "failed to get reset GPIO\n"); - sensor->clk = devm_clk_get(sensor->dev, NULL); + sensor->clk = devm_v4l2_sensor_clk_get(sensor->dev, NULL); if (IS_ERR(sensor->clk)) return dev_err_probe(sensor->dev, PTR_ERR(sensor->clk), "failed to get clock\n");