/* A bfin atapi device has been unplugged. Perform the needed cleanup. Also called on module unload for any active devices.  */
static int __devexit bfin_atapi_remove(struct platform_device *pdev)
/* A bfin atapi device has been unplugged. Perform the needed cleanup. Also called on module unload for any active devices.  */
static int __devexit bfin_atapi_remove(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
	struct ata_host *host = dev_get_drvdata(dev);
	ata_host_detach(host);
	dev_set_drvdata(&pdev->dev, NULL);
	peripheral_free_list(atapi_io_port);
	return 0;
}