/* This routine will shutdown a serial port; interrupts are disabled, and  */
static void dz_shutdown(struct uart_port *uport)
/* This routine will shutdown a serial port; interrupts are disabled, and  */
static void dz_shutdown(struct uart_port *uport)
{
	struct dz_port *dport = to_dport(uport);
	struct dz_mux *mux = dport->mux;
	unsigned long flags;
	int irq_guard;
	u16 tmp;
	spin_lock_irqsave(&dport->port.lock, flags);
	dz_stop_tx(&dport->port);
	spin_unlock_irqrestore(&dport->port.lock, flags);
	irq_guard = atomic_add_return(-1, &mux->irq_guard);
	if (!irq_guard) {
		tmp = dz_in(dport, DZ_CSR);
		tmp &= ~(DZ_RIE | DZ_TIE);
		dz_out(dport, DZ_CSR, tmp);
		free_irq(dport->port.irq, mux);
	}
}