Thread (22 messages) 22 messages, 6 authors, 2013-04-10
STALE4812d

[PATCH 09/14] media: mt9t112: support deferred probing

From: Guennadi Liakhovetski <hidden>
Date: 2012-09-27 14:07:28
Also in: linux-sh
Subsystem: media input infrastructure (v4l/dvb), the rest · Maintainers: Mauro Carvalho Chehab, Linus Torvalds

If .probe() is called without our private data, this might mean, that the
host driver hasn't probed yet. Defer probing in this case.

Signed-off-by: Guennadi Liakhovetski <redacted>
---
 drivers/media/i2c/soc_camera/mt9t112.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/media/i2c/soc_camera/mt9t112.c b/drivers/media/i2c/soc_camera/mt9t112.c
index dfa03f0..9e0837c 100644
--- a/drivers/media/i2c/soc_camera/mt9t112.c
+++ b/drivers/media/i2c/soc_camera/mt9t112.c
@@ -1094,7 +1094,10 @@ static int mt9t112_probe(struct i2c_client *client,
 	};
 	int ret;
 
-	if (!icl || !icl->priv) {
+	if (!icl)
+		return -EPROBE_DEFER;
+
+	if (!icl->priv) {
 		dev_err(&client->dev, "mt9t112: missing platform data!\n");
 		return -EINVAL;
 	}
-- 
1.7.2.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help