/* Unregisters a parallel port and free previously allocated resources (memory, IRQ, ...).  */
static __exit void parport_ip32_unregister_port(struct parport *p)
/* Unregisters a parallel port and free previously allocated resources (memory, IRQ, ...).  */
static __exit void parport_ip32_unregister_port(struct parport *p)
{
	struct parport_ip32_private * const priv = p->physport->private_data;
	struct parport_operations *ops = p->ops;
	parport_remove_port(p);
	if (p->modes & PARPORT_MODE_DMA)
		parport_ip32_dma_unregister();
	if (p->irq != PARPORT_IRQ_NONE)
		free_irq(p->irq, p);
	parport_put_port(p);
	kfree(priv);
	kfree(ops);
}