/* A PCMCIA ATA device has been unplugged. Perform the needed cleanup. Also called on module unload for any active devices.  */
static void pcmcia_remove_one(struct pcmcia_device *pdev)
/* A PCMCIA ATA device has been unplugged. Perform the needed cleanup. Also called on module unload for any active devices.  */
static void pcmcia_remove_one(struct pcmcia_device *pdev)
{
	struct ata_pcmcia_info *info = pdev->priv;
	struct device *dev = &pdev->dev;
	if (info != NULL) {
		if (info->ndev) {
			struct ata_host *host = dev_get_drvdata(dev);
			ata_host_detach(host);
		}
		info->ndev = 0;
		pdev->priv = NULL;
	}
	pcmcia_disable_device(pdev);
	kfree(info);
}