mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 18:51:21 +02:00
media: i2c: ov6650: 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 <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
197b2c2484
commit
c6e79ddd00
|
|
@ -898,12 +898,10 @@ static int ov6650_video_probe(struct v4l2_subdev *sd)
|
|||
u8 pidh, pidl, midh, midl;
|
||||
int i, ret = 0;
|
||||
|
||||
priv->clk = devm_clk_get(&client->dev, NULL);
|
||||
if (IS_ERR(priv->clk)) {
|
||||
ret = PTR_ERR(priv->clk);
|
||||
dev_err(&client->dev, "clk request err: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
priv->clk = devm_v4l2_sensor_clk_get(&client->dev, NULL);
|
||||
if (IS_ERR(priv->clk))
|
||||
return dev_err_probe(&client->dev, PTR_ERR(priv->clk),
|
||||
"clk request err\n");
|
||||
|
||||
rate = clk_get_rate(priv->clk);
|
||||
for (i = 0; rate && i < ARRAY_SIZE(ov6650_xclk); i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user