/* Stop timer and free the resources allocated by  */
int32_t timer_counter_remove(struct timer_counter_desc *dev)
/* Stop timer and free the resources allocated by  */
int32_t timer_counter_remove(struct timer_counter_desc *dev)
{
	int32_t ret;
	if(!dev)
		return -1;
	ret = timer_counter_activate(dev, false);
	if(ret != SUCCESS)
		return ret;
	free(dev);
	return ret;
}