From: Sakari Ailus <sakari.ailus@nokia.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] V4L: Int if: Set slave's master before attach, remove master argument
Date: Tue, 16 Oct 2007 18:08:27 +0300 [thread overview]
Message-ID: <11925473082391-git-send-email-sakari.ailus@nokia.com> (raw)
Set slave's master before master's attach call.
The master also now gets its own pointer from slave's structure.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
drivers/media/video/v4l2-int-device.c | 6 +++---
include/media/v4l2-int-device.h | 5 ++---
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/media/video/v4l2-int-device.c b/drivers/media/video/v4l2-int-device.c
index f497c94..286b7f0 100644
--- a/drivers/media/video/v4l2-int-device.c
+++ b/drivers/media/video/v4l2-int-device.c
@@ -65,12 +65,12 @@ static void v4l2_int_device_try_attach_all(void)
if (!try_module_get(m->module))
continue;
- if (m->u.master->attach(m, s)) {
+ s->u.slave->master = m;
+ if (m->u.master->attach(s)) {
+ s->u.slave->master = NULL;
module_put(m->module);
continue;
}
-
- s->u.slave->master = m;
}
}
}
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index 066ebfc..c8b80e0 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -44,9 +44,8 @@ enum v4l2_int_type {
struct v4l2_int_device;
struct v4l2_int_master {
- int (*attach)(struct v4l2_int_device *master,
- struct v4l2_int_device *slave);
- void (*detach)(struct v4l2_int_device *master);
+ int (*attach)(struct v4l2_int_device *slave);
+ void (*detach)(struct v4l2_int_device *slave);
};
typedef int (v4l2_int_ioctl_func)(struct v4l2_int_device *);
--
1.5.0.6
next reply other threads:[~2007-10-16 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 15:08 Sakari Ailus [this message]
2007-10-16 15:08 ` [PATCH] ARM: OMAP2: Camera: Fix v4l2 int device detach Sakari Ailus
2007-10-31 12:50 ` Tony Lindgren
2007-10-31 12:50 ` [PATCH] V4L: Int if: Set slave's master before attach, remove master argument Tony Lindgren
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=11925473082391-git-send-email-sakari.ailus@nokia.com \
--to=sakari.ailus@nokia.com \
--cc=linux-omap-open-source@linux.omap.com \
/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