linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/7] adv7180: use async subdev registration
@ 2014-04-14 10:36 Ben Dooks
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Dooks @ 2014-04-14 10:36 UTC (permalink / raw)
  To: linux-sh

Change to using the the async subdev registration API so
that when soc_camera is using OF to find devices this can
be found and attached.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 drivers/media/i2c/adv7180.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index d7d99f1..215afa0 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -29,6 +29,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>
+#include <media/v4l2-async.h>
 #include <linux/mutex.h>
 
 #define ADV7180_INPUT_CONTROL_REG			0x00
@@ -611,6 +612,11 @@ static int adv7180_probe(struct i2c_client *client,
 	ret = init_device(client, state);
 	if (ret)
 		goto err_free_ctrl;
+
+	ret = v4l2_async_register_subdev(sd);
+	if (ret)
+		goto err_free_ctrl;
+
 	return 0;
 
 err_free_ctrl:
@@ -641,7 +647,7 @@ static int adv7180_remove(struct i2c_client *client)
 	}
 
 	mutex_destroy(&state->mutex);
-	v4l2_device_unregister_subdev(sd);
+	v4l2_async_unregister_subdev(sd);
 	return 0;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* Re: [PATCH v3 1/7] adv7180: use async subdev registration
@ 2014-05-03 11:15 Guennadi Liakhovetski
  0 siblings, 0 replies; 2+ messages in thread
From: Guennadi Liakhovetski @ 2014-05-03 11:15 UTC (permalink / raw)
  To: linux-sh

Hi Ben,

On Mon, 14 Apr 2014, Ben Dooks wrote:

> Change to using the the async subdev registration API so
> that when soc_camera is using OF to find devices this can
> be found and attached.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

I think you're late with this one:

commit fa5b7945aefdbcd4419f0b8872ce67866d8071e3
Author: Lars-Peter Clausen <lars@metafoo.de>
Date:   Fri Mar 7 13:14:32 2014 -0300

    [media] adv7180: Add support for async device registration

Thanks
Guennadi

> ---
>  drivers/media/i2c/adv7180.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
> index d7d99f1..215afa0 100644
> --- a/drivers/media/i2c/adv7180.c
> +++ b/drivers/media/i2c/adv7180.c
> @@ -29,6 +29,7 @@
>  #include <linux/videodev2.h>
>  #include <media/v4l2-device.h>
>  #include <media/v4l2-ctrls.h>
> +#include <media/v4l2-async.h>
>  #include <linux/mutex.h>
>  
>  #define ADV7180_INPUT_CONTROL_REG			0x00
> @@ -611,6 +612,11 @@ static int adv7180_probe(struct i2c_client *client,
>  	ret = init_device(client, state);
>  	if (ret)
>  		goto err_free_ctrl;
> +
> +	ret = v4l2_async_register_subdev(sd);
> +	if (ret)
> +		goto err_free_ctrl;
> +
>  	return 0;
>  
>  err_free_ctrl:
> @@ -641,7 +647,7 @@ static int adv7180_remove(struct i2c_client *client)
>  	}
>  
>  	mutex_destroy(&state->mutex);
> -	v4l2_device_unregister_subdev(sd);
> +	v4l2_async_unregister_subdev(sd);
>  	return 0;
>  }
>  
> -- 
> 1.9.1
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-03 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 10:36 [PATCH v3 1/7] adv7180: use async subdev registration Ben Dooks
  -- strict thread matches above, loose matches on Subject: below --
2014-05-03 11:15 Guennadi Liakhovetski

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).