From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-sh@vger.kernel.org
Subject: [PATCH v3 1/7] adv7180: use async subdev registration
Date: Mon, 14 Apr 2014 10:36:36 +0000 [thread overview]
Message-ID: <1397471802-27216-2-git-send-email-ben.dooks@codethink.co.uk> (raw)
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
next reply other threads:[~2014-04-14 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 10:36 Ben Dooks [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-05-03 11:15 [PATCH v3 1/7] adv7180: use async subdev registration Guennadi Liakhovetski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397471802-27216-2-git-send-email-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).