diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2019-06-03 16:01:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-26 09:12:40 +0200 |
commit | 3b12115f3a38f118aae79ccd4d59e33d444f7e68 (patch) | |
tree | f40eb997b3600fc57a8f14b57f534d9bece657b7 | |
parent | ee2e483fe7f4bf2930b619ed3b2c2ca2e8f04a4f (diff) | |
download | linux-stable-3b12115f3a38f118aae79ccd4d59e33d444f7e68.tar.gz linux-stable-3b12115f3a38f118aae79ccd4d59e33d444f7e68.tar.bz2 linux-stable-3b12115f3a38f118aae79ccd4d59e33d444f7e68.zip |
media: mt9m111: fix fw-node refactoring
[ Upstream commit 8d4e29a51a954b43e06d916772fa4f50b7e5bbd6 ]
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: 98480d65c48c ("media: mt9m111: allow to setup pixclk polarity")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/media/i2c/mt9m111.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c index 5168bb5880c4..3a543e435e61 100644 --- a/drivers/media/i2c/mt9m111.c +++ b/drivers/media/i2c/mt9m111.c @@ -1248,9 +1248,11 @@ static int mt9m111_probe(struct i2c_client *client, if (!mt9m111) return -ENOMEM; - ret = mt9m111_probe_fw(client, mt9m111); - if (ret) - return ret; + if (dev_fwnode(&client->dev)) { + ret = mt9m111_probe_fw(client, mt9m111); + if (ret) + return ret; + } mt9m111->clk = v4l2_clk_get(&client->dev, "mclk"); if (IS_ERR(mt9m111->clk)) |