/* Close down a Z8530 interface and switch its interrupt handlers to discard future events.  */
int z8530_sync_close(struct net_device *dev, struct z8530_channel *c)
/* Close down a Z8530 interface and switch its interrupt handlers to discard future events.  */
int z8530_sync_close(struct net_device *dev, struct z8530_channel *c)
{
	u8 chk;
	unsigned long flags;
	spin_lock_irqsave(c->lock, flags);
	c->irqs = &z8530_nop;
	c->max = 0;
	c->sync = 0;
	chk=read_zsreg(c,R0);
	write_zsreg(c, R3, c->regs[R3]);
	z8530_rtsdtr(c,0);
	spin_unlock_irqrestore(c->lock, flags);
	return 0;
}