Re: [PATCH] Re: Move of input drivers, some word needed from you

From: Linus Torvalds (torvalds@transmeta.com)
Date: Mon Aug 21 2000 - 14:02:03 EST


On Mon, 21 Aug 2000, Philipp Rumpf wrote:
>
> Do we have _any_ bus-independent drivers ?

I don't think they make sense.

Yes, people always worry about common chips, but they don't happen all
that often in the end, and the pain from trying to share the code is
usually much MUCH bigger than the pain from just occasionally stealing
code from the other guy.

> So wouldn't it be the cleanest thing to do to split up the serial driver, put
> the generic parts into drivers/common/tty/serial.c, the PCI, ISAPnP, and GSC
> things (mostly detection) into drivers/{pci,isapnp,gsc}/serial/serial.c, and
> the architecture-dependent default ports into drivers/<arch>/serial/serial.c ?

The "common" part is drivers/char/. That makes sense to me, and I don't
think we have to come up with anything different. The other cases aren't
that big of a deal, they might as well just all go in drivers/serial:
unlike networking there aren't _that_ many serial chips out there.

The truly architecture-specific stuff (ie the ARM built-in serial stuff
etc) can go into arch/<xxx>/, but that wouldn't be a big thing either.

Let's not make this overly complex. The networking drivers have worked
pretty well with a single directory, and it makes it easy to find and grep
for things. Splitting things up _just_ for a nice hierarchy is a bad idea
too. It should be split up only when it actually starts getting crowded or
nasty for some other reason.

(There is a _lot_ to be said for the simplicity of just being able to do a
simple "grep xxxx *.c". Making people have to search for things usually
means something gets overlooked).

The current driver layout works pretty well in most cases, after all.

                Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Aug 23 2000 - 21:00:05 EST