[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190603200155.24358-1-robert.jarzmik@free.fr>
Date: Mon, 3 Jun 2019 22:01:55 +0200
From: Robert Jarzmik <robert.jarzmik@...e.fr>
To: Mauro Carvalho Chehab <mchehab@...nel.org>,
Enrico Scholz <enrico.scholz@...ma-chemnitz.de>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Robert Jarzmik <robert.jarzmik@...e.fr>
Subject: [PATCH] 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.
Fixes: 98480d65c48c ("media: mt9m111: allow to setup pixclk polarity")
Signed-off-by: Robert Jarzmik <robert.jarzmik@...e.fr>
---
drivers/media/i2c/mt9m111.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
index 168a5c74f368..d65c23301498 100644
--- a/drivers/media/i2c/mt9m111.c
+++ b/drivers/media/i2c/mt9m111.c
@@ -1209,7 +1209,7 @@ static int mt9m111_probe(struct i2c_client *client,
{
struct mt9m111 *mt9m111;
struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
- int ret;
+ int ret = 0;
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA)) {
dev_warn(&adapter->dev,
@@ -1221,7 +1221,8 @@ static int mt9m111_probe(struct i2c_client *client,
if (!mt9m111)
return -ENOMEM;
- ret = mt9m111_probe_fw(client, mt9m111);
+ if (client->dev.of_node)
+ ret = mt9m111_probe_fw(client, mt9m111);
if (ret)
return ret;
--
2.20.1
Powered by blists - more mailing lists