/* This unallocates io memory regions, dma-coherent regions etc which were allocated in ks8695_probe.  */
static void ks8695_release_device(struct ks8695_priv *ksp)
/* This unallocates io memory regions, dma-coherent regions etc which were allocated in ks8695_probe.  */
static void ks8695_release_device(struct ks8695_priv *ksp)
{
	iounmap(ksp->io_regs);
	if (ksp->phyiface_regs)
		iounmap(ksp->phyiface_regs);
	release_resource(ksp->regs_req);
	kfree(ksp->regs_req);
	if (ksp->phyiface_req) {
		release_resource(ksp->phyiface_req);
		kfree(ksp->phyiface_req);
	}
	dma_free_coherent(ksp->dev, RING_DMA_SIZE,
			  ksp->ring_base, ksp->ring_base_dma);
}