linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Gerd Knorr <kraxel@bytesex.org>
Cc: Kernel List <linux-kernel@vger.kernel.org>,
	video4linux list <video4linux-list@redhat.com>
Subject: Re: [RFC/PATCH] sysfs'ify video4linux
Date: Tue, 15 Jul 2003 14:27:14 -0700	[thread overview]
Message-ID: <20030715212714.GB5458@kroah.com> (raw)
In-Reply-To: <20030715143119.GB14133@bytesex.org>

On Tue, Jul 15, 2003 at 04:31:19PM +0200, Gerd Knorr wrote:
>   Hi,
> 
> This patch moves the video4linux subsystem from procfs to sysfs.
> Changes:
> 
>   * procfs support is completely gone, i.e. /proc/video doesn't
>     exist any more.

Yeah!

>   * there is a new device class instead: /sys/class/video4linux.
>     All video4linux devices which used to be listed in
>     /proc/video/dev are moved to that place.

Nice.

> Changes required/recommended in video4linux drivers:
> 
>   * some usb webcam drivers (usbvideo.ko, stv680.ko, se401.ko 
>     and ov511.ko) use the video_proc_entry() to add additional
>     procfs files.  These drivers must be converted to sysfs too
>     because video_proc_entry() doesn't exist any more.

I'd be glad to do this work once your change makes it into the core.  Is
there any need for these drivers to export anything through sysfs now
instead of /proc?  From what I remember, it only looked like debugging
and other general info stuff.

>   * struct video_device has a new "dev" field pointing to a struct
>     device.  Drivers should fill that one if possible.  It isn't
>     required through.  It will give you fancy device + driver symlinks
>     in /sys/class/video4linux/<name>.
>     The patch below includes the changes for bttv.

So dev should point to the dev of the video class device?

> Comments?

You _have_ to set up a release function for your class device.  You
can't just kfree it like I think you are doing, otherwise any users of
the sysfs files will oops the kernel after the video class device is
gone.  I can point you to some examples of how to do this if you like.

Other than that, how about exporting the dev_t value for the video
device?  Then you automatically get udev support, and I don't have to go
add it to this code later :)

thanks,

greg k-h

  parent reply	other threads:[~2003-07-15 21:15 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 [this message]
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
     [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=20030715212714.GB5458@kroah.com \
    --to=greg@kroah.com \
    --cc=kraxel@bytesex.org \
    --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).