Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2c94a674e059e89252d58da655efa4e798be4d48
Commit:     2c94a674e059e89252d58da655efa4e798be4d48
Parent:     53133afbeeb177487a907fdc2edf18f857497641
Author:     Sakari Ailus <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 30 05:52:52 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:02:06 2008 -0200

    V4L/DVB (6580): Set slave's master before master's attach call.
    
    V4L: Int if: Set slave's master before attach, remove master argument
    
    The master also now gets its own pointer from slave's structure.
    
    Signed-off-by: Sakari Ailus <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 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 8b4ef53..a545dca 100644
--- a/drivers/media/video/v4l2-int-device.c
+++ b/drivers/media/video/v4l2-int-device.c
@@ -57,12 +57,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 *);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to