/* Returns 0 on success. Currently it always succeeds.  */
int parport_register_driver(struct parport_driver *drv)
/* Returns 0 on success. Currently it always succeeds.  */
int parport_register_driver(struct parport_driver *drv)
{
	struct parport *port;
	if (list_empty(&portlist))
		get_lowlevel_driver ();
	mutex_lock(&registration_lock);
	list_for_each_entry(port, &portlist, list)
		drv->attach(port);
	list_add(&drv->list, &drivers);
	mutex_unlock(&registration_lock);
	return 0;
}