From: Tony Lindgren <tony@atomide.com>
To: Sakari Ailus <sakari.ailus@nokia.com>
Cc: linux-omap@vger.kernel.org, linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] ARM: OMAP 2: Camera: Fix device release
Date: Wed, 5 Dec 2007 14:42:43 -0800 [thread overview]
Message-ID: <20071205224243.GA4105@atomide.com> (raw)
In-Reply-To: <11967833392684-git-send-email-sakari.ailus@nokia.com>
* Sakari Ailus <sakari.ailus@nokia.com> [071204 07:50]:
> If streaming wasn't stopped before a file handle was closed,
> videobuf_streamoff got called after cam->streaming had been set NULL,
> causing an oops. Call videobuf_streamoff a bit earlier instead.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
> ---
> drivers/media/video/omap24xxcam.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
> index d394eab..96f4885 100644
> --- a/drivers/media/video/omap24xxcam.c
> +++ b/drivers/media/video/omap24xxcam.c
> @@ -1510,12 +1510,13 @@ static int omap24xxcam_release(struct inode *inode, struct file *file)
>
> flush_scheduled_work();
>
> - mutex_lock(&cam->mutex);
> /* stop streaming capture */
> + videobuf_streamoff(&fh->vbq);
> +
> + mutex_lock(&cam->mutex);
> if (cam->streaming == file) {
> cam->streaming = NULL;
> mutex_unlock(&cam->mutex);
> - videobuf_streamoff(&fh->vbq);
> sysfs_notify(&cam->dev->kobj, NULL, "streaming");
> } else {
> mutex_unlock(&cam->mutex);
> --
Pushing today
Tony
prev parent reply other threads:[~2007-12-05 22:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-04 15:48 [PATCH] ARM: OMAP 2: Camera: Fix device release Sakari Ailus
2007-12-05 22:42 ` Tony Lindgren [this message]
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=20071205224243.GA4105@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap-open-source@linux.omap.com \
--cc=linux-omap@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox