Commit 8d4e29a5 authored by Robert Jarzmik's avatar Robert Jarzmik Committed by Mauro Carvalho Chehab

media: mt9m111: fix fw-node refactoring

In the patch refactoring the fw-node, the mt9m111 was broken for all
platform_data based platforms, which were the first aim of this
driver. Only the devicetree platform are still functional, probably
because the testing was done on these.

The result is that -EINVAL is systematically return for such platforms,
what this patch fixes.

[Sakari Ailus: Rework this to resolve a merge conflict and use dev_fwnode]

Fixes: 98480d65 ("media: mt9m111: allow to setup pixclk polarity")
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent ecaa3e94
...@@ -1263,9 +1263,11 @@ static int mt9m111_probe(struct i2c_client *client, ...@@ -1263,9 +1263,11 @@ static int mt9m111_probe(struct i2c_client *client,
if (!mt9m111) if (!mt9m111)
return -ENOMEM; return -ENOMEM;
if (dev_fwnode(&client->dev)) {
ret = mt9m111_probe_fw(client, mt9m111); ret = mt9m111_probe_fw(client, mt9m111);
if (ret) if (ret)
return ret; return ret;
}
mt9m111->clk = v4l2_clk_get(&client->dev, "mclk"); mt9m111->clk = v4l2_clk_get(&client->dev, "mclk");
if (IS_ERR(mt9m111->clk)) if (IS_ERR(mt9m111->clk))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment