From: Gerd Knorr <kraxel@bytesex.org>
To: Greg KH <greg@kroah.com>
Cc: Kernel List <linux-kernel@vger.kernel.org>,
video4linux list <video4linux-list@redhat.com>
Subject: Re: [RFC/PATCH] sysfs'ify video4linux
Date: Fri, 18 Jul 2003 11:59:21 +0200 [thread overview]
Message-ID: <20030718095920.GA32558@bytesex.org> (raw)
In-Reply-To: <20030717214907.GA3255@kroah.com>
On Thu, Jul 17, 2003 at 02:49:07PM -0700, Greg KH wrote:
> On Thu, Jul 17, 2003 at 06:37:15PM +0200, Gerd Knorr wrote:
> >
> > Version (1) can be done without breaking the build, with a hack along
> > the lines "if (no release callback) printk(KERN_WARN please fix your
> > driver)", so the drivers can be fixed step-by-step afterwards.
>
> That sounds like a nice way to start.
>
> > Fixing the drivers might be non-trivial through. Some drivers are
> > hot-pluggable (usb cams), some drivers register more than one v4l device
> > (bttv wants up to three). Those drivers can't just call kfree() in the
> > ->release callback because there might be other references, some open
> > file handle for a unplugged usb cam, another not-yet unregistered
> > v4l device, whatever. Probably they must implement some reference
> > counting scheme to get that right. The very simple ones (in
> > drivers/media/radio for example) likely just need the kfree() moved
> > from the ->remove function into the new ->release() callback.
>
> I don't think it will be that bad for them. Just have them change the
> v4l device from being a structure included in their structure, into a
> pointer, and then create it before registering, and free it in the
> release() callback.
>
> That being said, I haven't actually looked at the code to verify that
> this is all that is needed :)
>
> > Version (2) needs every v4l driver touched to make it compile again.
> > Not sure how hard it is to fixup them. I'd guess it is pretty straigt
> > forward to do the conversion, it's just alot of work. I also could do
> > a number of other cleanups along the way. Maybe I trap into some hidden
> > pitfalls through, havn't looked at all the drivers in detail yet.
>
> Breaking the build is a very good thing to do at times, to ensure that
> stuff gets fixed properly. Users might go for a while without realizing
> that there really is a problem in their driver.
>
> But in the end, it's up to you...
>
> thanks,
>
> greg k-h
--
sigfault
next prev parent reply other threads:[~2003-07-18 9:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-15 14:31 [RFC/PATCH] sysfs'ify video4linux Gerd Knorr
2003-07-15 15:21 ` Ronald Bultje
2003-07-15 16:19 ` Matt Porter
2003-07-15 21:27 ` Greg KH
2003-07-16 8:44 ` Gerd Knorr
2003-07-16 16:19 ` Greg KH
2003-07-16 20:20 ` Gerd Knorr
2003-07-16 21:08 ` Greg KH
2003-07-17 12:01 ` Gerd Knorr
2003-07-17 14:57 ` Greg KH
2003-07-17 16:37 ` Gerd Knorr
2003-07-17 21:49 ` Greg KH
2003-07-18 9:59 ` Gerd Knorr [this message]
[not found] ` <20030718234359.GK1583@kroah.com>
2003-07-21 7:28 ` Gerd Knorr
2003-07-21 7:55 ` Ronald Bultje
2003-07-21 15:43 ` [RFC/PATCH] 1/2 v4l: sysfs'ify video4linux core Gerd Knorr
2003-07-21 15:47 ` [RFC/PATCH] 2/2 v4l: sysfs'ify bttv driver Gerd Knorr
2003-07-21 16:27 ` [RFC/PATCH] 1/2 v4l: sysfs'ify video4linux core Greg KH
2003-07-16 13:33 ` [RFC/PATCH] sysfs'ify video4linux Mark McClelland
2003-07-16 14:10 ` root
2003-07-16 16:23 ` Greg KH
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=20030718095920.GA32558@bytesex.org \
--to=kraxel@bytesex.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=video4linux-list@redhat.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;
as well as URLs for NNTP newsgroup(s).