[PATCH] parport fixes (2/6)
We use a new mutex to protect all additions/removals of drivers and
ports. That cures a lot of insanity:
* driver removals can't hit us in the middle of attach_driver_chain().
Old code simply dies on that.
* port removals can't hit us in the middle of driver registration.
Again, old code dies on that.
* driver ->detach() is allowed to block now.
* we are guaranteed that by the time when parport_unregister_driver()
returns, all ->detach() calls are finished. Old code did _not_ guarantee
that (read: was inherently racy since rmmod of driver could race with port
removal and get driver->detach(port) called after the module was gone).
* we are guaranteed that driver->attach(port) won't be called
more than once. With the old code that was a matter of luck.
* removed piles and piles of braindead code.