/* Called by hardware driver to remove the registration of a controller with the CAPI subsystem. Return value: 0 on success, error code < 0 on error  */
int detach_capi_ctr(struct capi_ctr *card)
/* Called by hardware driver to remove the registration of a controller with the CAPI subsystem. Return value: 0 on success, error code < 0 on error  */
int detach_capi_ctr(struct capi_ctr *card)
{
        if (card->cardstate != CARD_DETECTED)
		capi_ctr_down(card);
	ncards--;
	if (card->procent) {
	   remove_proc_entry(card->procfn, NULL);
	   card->procent = NULL;
	}
	capi_cards[card->cnr - 1] = NULL;
	printk(KERN_NOTICE "kcapi: Controller [%03d]: %s unregistered\n",
			card->cnr, card->name);
	return 0;
}