/* Deallocates the memory needed for the UART descriptor.  */
static void free_desc_mem(struct uart_desc *desc)
/* Deallocates the memory needed for the UART descriptor.  */
static void free_desc_mem(struct uart_desc *desc)
{
	struct aducm_uart_desc	*aducm_desc = desc->extra;
	free((void *)((uint32_t)aducm_desc->adi_uart_buffer -
		      aducm_desc->adi_uart_buffer_offset));
	aducm_desc->adi_uart_buffer = NULL;
	aducm_desc->adi_uart_buffer_offset = 0;
	free(desc->extra);
	free(desc);
}