up(&chrdevs_lock);
down(&chrdevs_lock);
__unregister_chrdev_region(unsigned major, unsigned baseminor, int minorct){	struct char_device_struct *cd = NULL, **cp;	int i = major_to_index(major);	up(&chrdevs_lock);	for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next)		if ((*cp)->major == major &&		    (*cp)->baseminor == baseminor &&		    (*cp)->minorct == minorct)			break;	if (*cp) {		cd = *cp;		*cp = cd->next;	}	up(&chrdevs_lock);	return cd;}