From: Roman Zippel <zippel@linux-m68k.org>
To: Greg KH <greg@kroah.com>
Cc: Andries.Brouwer@cwi.nl, <linux-kernel@vger.kernel.org>, <akpm@digeo.com>
Subject: Re: [PATCH] alternative dev patch
Date: Sun, 23 Mar 2003 16:05:24 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.44.0303231557230.5042-100000@serv> (raw)
In-Reply-To: <20030323081956.GK26145@kroah.com>
Hi,
On Sun, 23 Mar 2003, Greg KH wrote:
> > There are a few options:
> > 1. Drivers can implement that themselves:
>
> Yeah, but as I know, it's a big pain in the butt. Let's make it easy to
> do this, don't make writing a driver tougher than it has to be (it's
> already much harder than it used to be.) Andries's patch makes it easy,
> which is a good thing in my book.
Andries' patch doesn't help at all and only makes things worse. Only very
few drivers should have to deal with the major/minor business. Most
drivers should just do add_serial_device/add_tape_device/... and these
function will do the right thing (e.g. announce the new device via sysfs).
> > register_usb_device(...)
> > {
> > ...
> > cdev = cdget(dev);
> > down(&cdev->sem);
> > if (cdev->fops)
> > ...;
> > cdev->fops = fops;
> > up(&cdev->sem);
> > }
> > (see the misc driver again for a detailed example.)
>
> Look at drivers/usb/core/file.c::usb_open(), it does much the same
> thing. Well, functionally the same, not identical in any way :)
No, with my patch usb_open() and usb_minors[] could go away completely,
you just setup everything in usb_register_dev() and the rest is done for
you.
With Andries' patch you will not get rid of this.
bye, Roman
next prev parent reply other threads:[~2003-03-23 14:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-20 21:50 Andries.Brouwer
2003-03-20 23:03 ` Roman Zippel
2003-03-21 1:24 ` Greg KH
2003-03-21 9:08 ` Roman Zippel
2003-03-22 1:38 ` Greg KH
2003-03-22 13:02 ` Roman Zippel
2003-03-23 8:19 ` Greg KH
2003-03-23 8:30 ` Christoph Hellwig
2003-03-23 15:05 ` Roman Zippel [this message]
2003-03-23 16:32 ` Christoph Hellwig
2003-03-23 8:50 ` Christoph Hellwig
2003-03-23 8:46 ` Christoph Hellwig
2003-03-23 15:11 ` Roman Zippel
-- strict thread matches above, loose matches on Subject: below --
2003-03-20 0:57 Roman Zippel
2003-03-20 20:40 ` Roman Zippel
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=Pine.LNX.4.44.0303231557230.5042-100000@serv \
--to=zippel@linux-m68k.org \
--cc=Andries.Brouwer@cwi.nl \
--cc=akpm@digeo.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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®