public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Valentin <edubezval@gmail.com>
To: linux-omap-open-source@linux.omap.com
Cc: Eduardo Valentin <eduardo.valentin@indt.org.br>,
	linux-omap@vger.kernel.org
Subject: [PATCH 2/3] ARM: OMAP1: Camera: Fix v4l2 int device detach
Date: Wed, 21 Nov 2007 18:23:04 -0400	[thread overview]
Message-ID: <1195683785-32132-3-git-send-email-edubezval@gmail.com> (raw)
In-Reply-To: <1195683785-32132-2-git-send-email-edubezval@gmail.com>

From: Eduardo Valentin <eduardo.valentin@indt.org.br>

camera_device_unregister expected the argument to be its own
device structure but it's actually that of its slave.

Also get master from slave's structure in camera_device_register.

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
---
 drivers/media/video/omap/camera_core.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/media/video/omap/camera_core.c b/drivers/media/video/omap/camera_core.c
index 6e5d8bd..be033be 100644
--- a/drivers/media/video/omap/camera_core.c
+++ b/drivers/media/video/omap/camera_core.c
@@ -1007,17 +1007,16 @@ static ssize_t camera_streaming_show(struct device *dev,
 
 static DEVICE_ATTR(streaming, S_IRUGO, camera_streaming_show, NULL);
 
-static void camera_device_unregister(struct v4l2_int_device *ctl)
+static void camera_device_unregister(struct v4l2_int_device *s)
 {
-	struct camera_device *cam = ctl->priv;
+	struct camera_device *cam = s->u.slave->master->priv;
 
 	camera_sensor_exit(cam);
 }
 
-static int camera_device_register(struct v4l2_int_device *ctl,
-				  struct v4l2_int_device *s)
+static int camera_device_register(struct v4l2_int_device *s)
 {
-	struct camera_device *cam = ctl->priv;
+	struct camera_device *cam = s->u.slave->master->priv;
 	struct video_device *vfd;
 	int rval;
 
@@ -1092,7 +1091,7 @@ static int camera_device_register(struct v4l2_int_device *ctl,
 	return 0;
 
 err:
-	camera_device_unregister(ctl);
+	camera_device_unregister(s);
 
 	return rval;
 }
-- 
1.5.3.4.206.g58ba4

  reply	other threads:[~2007-11-21 22:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 22:23 [PATH 0/3] ARM: OMAP1: Camera: Updates API usage and removes unused files Eduardo Valentin
2007-11-21 22:23 ` [PATCH 1/3] ARM: OMAP1: Camera: Update videobuf utilization Eduardo Valentin
2007-11-21 22:23   ` Eduardo Valentin [this message]
2007-11-21 22:23     ` [PATCH 3/3] ARM: OMAP1: Camera: Removes unused files Eduardo Valentin
2007-11-28  2:25 ` [PATH 0/3] ARM: OMAP1: Camera: Updates API usage and removes " Tony Lindgren
2007-11-29 12:38   ` Eduardo Valentin
2007-12-01  0:05     ` 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=1195683785-32132-3-git-send-email-edubezval@gmail.com \
    --to=edubezval@gmail.com \
    --cc=eduardo.valentin@indt.org.br \
    --cc=linux-omap-open-source@linux.omap.com \
    --cc=linux-omap@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