From: Sakari Ailus <sakari.ailus@nokia.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] ARM: OMAP2: Camera: Fix v4l2 int device detach
Date: Tue, 16 Oct 2007 18:08:28 +0300 [thread overview]
Message-ID: <1192547308415-git-send-email-sakari.ailus@nokia.com> (raw)
In-Reply-To: <11925473082391-git-send-email-sakari.ailus@nokia.com>
omap24xxcam_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 omap24xxcam_device_register.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
drivers/media/video/omap24xxcam.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index 7da1668..8fda9e1 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/video/omap24xxcam.c
@@ -46,7 +46,7 @@
static void omap24xxcam_reset(struct omap24xxcam_device *cam);
static int omap24xxcam_sensor_if_enable(struct omap24xxcam_device *cam);
-static void omap24xxcam_device_unregister(struct v4l2_int_device *ctl);
+static void omap24xxcam_device_unregister(struct v4l2_int_device *s);
static int omap24xxcam_remove(struct platform_device *pdev);
/* module parameters */
@@ -1603,10 +1603,9 @@ static int omap24xxcam_resume(struct platform_device *pdev)
*
*/
-static int omap24xxcam_device_register(struct v4l2_int_device *ctl,
- struct v4l2_int_device *s)
+static int omap24xxcam_device_register(struct v4l2_int_device *s)
{
- struct omap24xxcam_device *cam = ctl->priv;
+ struct omap24xxcam_device *cam = s->u.slave->master->priv;
struct video_device *vfd;
int rval;
@@ -1681,14 +1680,14 @@ static int omap24xxcam_device_register(struct v4l2_int_device *ctl,
return 0;
err:
- omap24xxcam_device_unregister(ctl);
+ omap24xxcam_device_unregister(s);
return rval;
}
-static void omap24xxcam_device_unregister(struct v4l2_int_device *ctl)
+static void omap24xxcam_device_unregister(struct v4l2_int_device *s)
{
- struct omap24xxcam_device *cam = ctl->priv;
+ struct omap24xxcam_device *cam = s->u.slave->master->priv;
omap24xxcam_sensor_exit(cam);
--
1.5.0.6
next prev parent 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 [PATCH] V4L: Int if: Set slave's master before attach, remove master argument Sakari Ailus
2007-10-16 15:08 ` Sakari Ailus [this message]
2007-10-31 12:50 ` [PATCH] ARM: OMAP2: Camera: Fix v4l2 int device detach 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=1192547308415-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