/* This reverses the effect of atmel_tc_alloc(), unmapping the I/O registers, invalidating the resource returned by that routine and making the TC available to other drivers.  */
void atmel_tc_free(struct atmel_tc *tc)
/* This reverses the effect of atmel_tc_alloc(), unmapping the I/O registers, invalidating the resource returned by that routine and making the TC available to other drivers.  */
void atmel_tc_free(struct atmel_tc *tc)
{
	spin_lock(&tc_list_lock);
	if (tc->regs) {
		iounmap(tc->regs);
		release_resource(tc->iomem);
		tc->regs = NULL;
		tc->iomem = NULL;
	}
	spin_unlock(&tc_list_lock);
}