* [PATCH] media: i2c: mt9p031: add support for asynchronous probing
@ 2015-02-27 16:10 Lad Prabhakar
2015-03-08 13:37 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Lad Prabhakar @ 2015-02-27 16:10 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linux-media, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Both synchronous and asynchronous mt9p031 subdevice probing
is supported by this patch.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
drivers/media/i2c/mt9p031.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
index af5a09d..9df4e2f 100644
--- a/drivers/media/i2c/mt9p031.c
+++ b/drivers/media/i2c/mt9p031.c
@@ -28,6 +28,7 @@
#include <linux/videodev2.h>
#include <media/mt9p031.h>
+#include <media/v4l2-async.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-subdev.h>
@@ -1145,6 +1146,10 @@ static int mt9p031_probe(struct i2c_client *client,
}
ret = mt9p031_clk_setup(mt9p031);
+ if (ret)
+ goto done;
+
+ ret = v4l2_async_register_subdev(&mt9p031->subdev);
done:
if (ret < 0) {
@@ -1162,7 +1167,7 @@ static int mt9p031_remove(struct i2c_client *client)
struct mt9p031 *mt9p031 = to_mt9p031(subdev);
v4l2_ctrl_handler_free(&mt9p031->ctrls);
- v4l2_device_unregister_subdev(subdev);
+ v4l2_async_unregister_subdev(subdev);
media_entity_cleanup(&subdev->entity);
mutex_destroy(&mt9p031->power_lock);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: i2c: mt9p031: add support for asynchronous probing
2015-02-27 16:10 [PATCH] media: i2c: mt9p031: add support for asynchronous probing Lad Prabhakar
@ 2015-03-08 13:37 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2015-03-08 13:37 UTC (permalink / raw)
To: Lad Prabhakar; +Cc: linux-media
Hi Prabhakar,
Thank you for the patch.
On Friday 27 February 2015 16:10:19 Lad Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> Both synchronous and asynchronous mt9p031 subdevice probing
> is supported by this patch.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
I have the exact same patch in my tree, so
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
I'll pick yours as I haven't posted mine before. It should remind me to post
early next time :-)
> ---
> drivers/media/i2c/mt9p031.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
> index af5a09d..9df4e2f 100644
> --- a/drivers/media/i2c/mt9p031.c
> +++ b/drivers/media/i2c/mt9p031.c
> @@ -28,6 +28,7 @@
> #include <linux/videodev2.h>
>
> #include <media/mt9p031.h>
> +#include <media/v4l2-async.h>
> #include <media/v4l2-ctrls.h>
> #include <media/v4l2-device.h>
> #include <media/v4l2-subdev.h>
> @@ -1145,6 +1146,10 @@ static int mt9p031_probe(struct i2c_client *client,
> }
>
> ret = mt9p031_clk_setup(mt9p031);
> + if (ret)
> + goto done;
> +
> + ret = v4l2_async_register_subdev(&mt9p031->subdev);
>
> done:
> if (ret < 0) {
> @@ -1162,7 +1167,7 @@ static int mt9p031_remove(struct i2c_client *client)
> struct mt9p031 *mt9p031 = to_mt9p031(subdev);
>
> v4l2_ctrl_handler_free(&mt9p031->ctrls);
> - v4l2_device_unregister_subdev(subdev);
> + v4l2_async_unregister_subdev(subdev);
> media_entity_cleanup(&subdev->entity);
> mutex_destroy(&mt9p031->power_lock);
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-08 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 16:10 [PATCH] media: i2c: mt9p031: add support for asynchronous probing Lad Prabhakar
2015-03-08 13:37 ` Laurent Pinchart
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).