Subject: Double take

From: Philip Blundell <[email-masked]>
Date: Tue, 15 Apr 1997 21:10:37 +0000 (GMT)

At the moment all the driver stuff for ARM machines seems to live in
linux/arch/arm/drivers.  This is all well and good for ARM-specific like
the keyboard driver, but I think an awful lot of the rest of the stuff
there doesn't really belong.

For example, if I diff arch/arm/drivers/net/8390.c against
drivers/net/8390.c, it turns out that only two lines were changed, and
neither of them is really an ARM specific.  And looking at the other
drivers, it's often the same story.  Quite a lot of them have just had
code taken out that wasn't applicable to the ARM, but was guarded by a
#ifdef CONFIG option that would never have been set in any case.  Even
worse, some of them have changes that are just cosmetic, and/or that
actually ought to have been folded back into the generic versions.  

In the char/ subdirectory, this certainly goes for lp.c, mem.c, misc.c and
serial.c, and probably more besides.  In block/, both floppy.c and ide.c
(the two largest drivers, by a long way) are both in this category, and I
suspect genhd.c isn't beyond hope.  In net/, it's just 8390.c and ppp.c
that are almost exact duplicates of the generic equivalents, but we've
also picked up a stray copy of Space.c that I don't think ought to be
there. 

It would be far better if this stuff stayed in the common drivers/
directory, and any necessary changes got wrapped up in some appropriate
#if.  Otherwise we increase the size of the kernel source distribution to
no purpose, we confuse people looking at the code, and we make more work
for ourselves in duplicating any improvements that get made in the generic
drivers.  When I get time I'll see about doing some of this myself. 

Equally, I think the people for other architectures, particularly the m68k
lot, probably ought to be gently prodded to see if we can get them to move
stuff like amigamouse.c and so on out of the generic drivers directory and
into arch/m68k, or roll it together with the generic equivalent.  I'll cc
this to the 68k mailing list as well and see what they say.

phil