unifying yenta.c and pci_socket.c ?
Linus Torvalds
torvalds at transmeta.com
Fri Apr 25 11:00:41 BST 2003
On Fri, 25 Apr 2003, Dominik Brodowski wrote:
>
> What is your opinion about unifying drivers/pcmcia/yenta.c and
> drivers/pcmcia/pci_socket.c ? No other low-level driver uses pci_socket.c,
> and I suspect getting rid of this midlayer will clean up the code some.
Oh, as far as I'm concerned that's more up to Russell King and you than me
these days, as you guys have been the people doign this. There are two
reasons I did pci_socket, and one of them is stale and the other one is a
matter of taste.
- I thought there would potentially be more users of it, but it looks
like everybody either did completely their own, or just follow the
yenta spec (well, more-or-less follow it - there's obviously all the
extensions and workarounds)
- I wanted to get rod of that HORRIBLE "int sock" crap in PCMCIA. I
think passing indexes around is more than stupid - it's close to being
evil. pci_socket() turns those evil indexes into a type-checked
structure-pointer to the descriptor, and means that the _real_ driver
doesn't have to worry about socket indexes.
As yu can guess from my second point, I actually think pci_socket.c is
worth keeping around even if there is only one driver if only because it
acts as a insulation layer to some _really_ bad design in the original
PCMCIA code that is still around. But as I said, as long as I'm not
actually _workign_ on it, my vote doesn't count that much any more.
Linus
More information about the linux-pcmcia
mailing list