From: Tony Lindgren <tony@atomide.com>
To: Sakari Ailus <sakari.ailus@nokia.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] ARM: OMAP2: Camera: Fix v4l2 int device detach
Date: Wed, 31 Oct 2007 05:50:17 -0700 [thread overview]
Message-ID: <20071031125017.GD32547@atomide.com> (raw)
In-Reply-To: <1192547308415-git-send-email-sakari.ailus@nokia.com>
* Sakari Ailus <sakari.ailus@nokia.com> [071016 08:17]:
> 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);
>
Pushing today.
Tony
next prev parent reply other threads:[~2007-10-31 12:50 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 ` [PATCH] ARM: OMAP2: Camera: Fix v4l2 int device detach Sakari Ailus
2007-10-31 12:50 ` Tony Lindgren [this message]
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=20071031125017.GD32547@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap-open-source@linux.omap.com \
--cc=sakari.ailus@nokia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.