From: Ronald Bultje <rbultje@ronald.bitfreak.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: Pauline Middelink <middelink@polyware.nl>,
linux-kernel@vger.kernel.org, kraxel@bytesex.org
Subject: Re: zr36120 2.6.x port (was: Re: [Mjpeg-users] DC30+ can't capture size greater than 224x168)
Date: Thu, 25 Sep 2003 21:21:57 +0200 [thread overview]
Message-ID: <1064517681.2228.724.camel@shrek.bitfreak.net> (raw)
In-Reply-To: <20030925171010.A17271@infradead.org>
Hi,
On Thu, 2003-09-25 at 18:10, Christoph Hellwig wrote:
> On Thu, Sep 25, 2003 at 05:59:44PM +0200, Ronald Bultje wrote:
> > + if (!try_module_get(THIS_MODULE)) {
> > + printk(KERN_ERR "failed to acquire lock on myself\n");
> > + return -EIO;
> > + }
>
> This is broken, you need an owner outside the open routine.
Eh? could you explain, please?
> > +
> > + /* find the device */
> > + for (i = 0; i < zoran_cards; i++) {
> > + if (zorans[i].video_dev->minor == minor) {
> > + ztv = &zorans[i];
> > + break;
> > + }
> > + }
>
> What serializes this?
We have an array of devices, and in order to find the right one, we go
through the array until the inode belonging to the device that's being
opened matches the one in the video device that we reigstered during
module loading. I don't know of a way to get that information in any
direct (non-loop) way, but that might be because I never cared to. I
admit it's ugly, but it's correct and used in other drivers, too.
Ronald
--
Ronald Bultje <rbultje@ronald.bitfreak.net>
Linux Video/Multimedia developer
next prev parent reply other threads:[~2003-09-25 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BAY7-F62oStVwgTlLlJ0001924a@hotmail.com>
[not found] ` <1064478814.2220.326.camel@shrek.bitfreak.net>
[not found] ` <20030925084932.GA22441@polyware.nl>
[not found] ` <1064484678.2227.465.camel@shrek.bitfreak.net>
[not found] ` <20030925102635.GA25634@polyware.nl>
2003-09-25 15:59 ` Ronald Bultje
2003-09-25 16:10 ` Christoph Hellwig
2003-09-25 19:21 ` Ronald Bultje [this message]
2003-09-25 16:43 ` Gerd Knorr
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=1064517681.2228.724.camel@shrek.bitfreak.net \
--to=rbultje@ronald.bitfreak.net \
--cc=hch@infradead.org \
--cc=kraxel@bytesex.org \
--cc=linux-kernel@vger.kernel.org \
--cc=middelink@polyware.nl \
/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
all inboxes | Powered by JetHome®