* [PATCH] [media] tvp5150: add support for asynchronous probing
@ 2015-09-21 11:23 Javier Martinez Canillas
2015-09-21 11:27 ` Sakari Ailus
2015-09-22 20:14 ` Lad, Prabhakar
0 siblings, 2 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2015-09-21 11:23 UTC (permalink / raw)
To: linux-kernel
Cc: Laurent Pinchart, Sakari Ailus, Javier Martinez Canillas,
Mauro Carvalho Chehab, Boris BREZILLON, Krzysztof Kozlowski,
Prabhakar Lad, Guennadi Liakhovetski, Hans Verkuil, linux-media
Allow the subdevice to be probed asynchronously.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/i2c/tvp5150.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index 522a865c5c60..3c5fb2509c47 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -10,6 +10,7 @@
#include <linux/videodev2.h>
#include <linux/delay.h>
#include <linux/module.h>
+#include <media/v4l2-async.h>
#include <media/v4l2-device.h>
#include <media/tvp5150.h>
#include <media/v4l2-ctrls.h>
@@ -1172,8 +1173,7 @@ static int tvp5150_probe(struct i2c_client *c,
sd->ctrl_handler = &core->hdl;
if (core->hdl.error) {
res = core->hdl.error;
- v4l2_ctrl_handler_free(&core->hdl);
- return res;
+ goto err;
}
v4l2_ctrl_handler_setup(&core->hdl);
@@ -1186,9 +1186,17 @@ static int tvp5150_probe(struct i2c_client *c,
core->rect.left = 0;
core->rect.width = TVP5150_H_MAX;
+ res = v4l2_async_register_subdev(sd);
+ if (res < 0)
+ goto err;
+
if (debug > 1)
tvp5150_log_status(sd);
return 0;
+
+err:
+ v4l2_ctrl_handler_free(&core->hdl);
+ return res;
}
static int tvp5150_remove(struct i2c_client *c)
@@ -1200,7 +1208,7 @@ static int tvp5150_remove(struct i2c_client *c)
"tvp5150.c: removing tvp5150 adapter on address 0x%x\n",
c->addr << 1);
- v4l2_device_unregister_subdev(sd);
+ v4l2_async_unregister_subdev(sd);
v4l2_ctrl_handler_free(&decoder->hdl);
return 0;
}
--
2.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] tvp5150: add support for asynchronous probing
2015-09-21 11:23 [PATCH] [media] tvp5150: add support for asynchronous probing Javier Martinez Canillas
@ 2015-09-21 11:27 ` Sakari Ailus
2015-09-22 20:14 ` Lad, Prabhakar
1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2015-09-21 11:27 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel
Cc: Laurent Pinchart, Mauro Carvalho Chehab, Boris BREZILLON,
Krzysztof Kozlowski, Prabhakar Lad, Guennadi Liakhovetski,
Hans Verkuil, linux-media
Javier Martinez Canillas wrote:
> Allow the subdevice to be probed asynchronously.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
--
Sakari Ailus
sakari.ailus@linux.intel.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] tvp5150: add support for asynchronous probing
2015-09-21 11:23 [PATCH] [media] tvp5150: add support for asynchronous probing Javier Martinez Canillas
2015-09-21 11:27 ` Sakari Ailus
@ 2015-09-22 20:14 ` Lad, Prabhakar
1 sibling, 0 replies; 3+ messages in thread
From: Lad, Prabhakar @ 2015-09-22 20:14 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: LKML, Laurent Pinchart, Sakari Ailus, Mauro Carvalho Chehab,
Boris BREZILLON, Krzysztof Kozlowski, Guennadi Liakhovetski,
Hans Verkuil, linux-media
On Mon, Sep 21, 2015 at 12:23 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Allow the subdevice to be probed asynchronously.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cheers,
--Prabhakar Lad
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-22 20:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21 11:23 [PATCH] [media] tvp5150: add support for asynchronous probing Javier Martinez Canillas
2015-09-21 11:27 ` Sakari Ailus
2015-09-22 20:14 ` Lad, Prabhakar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).