/* All the driver's attach() and detach() calls are guaranteed to have finished by the time this function returns.  */
void parport_unregister_driver(struct parport_driver *drv)
/* All the driver's attach() and detach() calls are guaranteed to have finished by the time this function returns.  */
void parport_unregister_driver(struct parport_driver *drv)
{
	struct parport *port;
	mutex_lock(&registration_lock);
	list_del_init(&drv->list);
	list_for_each_entry(port, &portlist, list)
		drv->detach(port);
	mutex_unlock(&registration_lock);
}