On Tue, 15 May 2001, Jeff Garzik wrote:
> Linus Torvalds wrote:
> >
> > What are the valid cases that couldn't just register as a misc'ish
> > driver? The one that stands out is serial devices (you have hundreds of
> > them), but that's the same argument as a disk anyway.
>
> /dev/fbN, /dev/dspN, /dev/videoN, ...
I still don't see why they couldn't be misc drivers?
Sure, some of them already exist and all that, and we need to support
their major numbers just for backwards compatibility reasons. But a simple
"give me 16 minors, please" should work fine, together with minimal
infrastructure to create the nodes.
Think of the problem as a hot-plug issue. We don't want to statically
allocate device numbers etc for hotplug - we create the nodes on an
as-needed basis when the device is plugged in, and it's fairly easy to do
with a /sbin/hotplug kind of approach.
Static devices like /dev/fbN are no different. They were just plugged in
before the OS booted.
We already need (and largely _have_) the infrastructure for creating
device nodes dynamically: modprobe has done this since pretty much day
one, and /sbin/hotplug allows for it too. What's so distasteful with
applying the same logic to pretty much _all_ devices, and get away from
the silly static number allocation.
There are _very_ few things that need static numbers, and 99% of them are
either (a) legacy reasons, ie people _know_ that IDE is major 3 or (b)
really ugly stuff like the ioctl() example Alan posted which is not really
due to wanting static major numbers at all, but is using static knowledge
to work around _other_ problems.
Fixing those other problems would be good too ;)
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/