/* That one should not be called, macio isn't really a hotswap device, we don't expect one of those serial ports to go away...  */
static int pmz_detach(struct macio_dev *mdev)
/* That one should not be called, macio isn't really a hotswap device, we don't expect one of those serial ports to go away...  */
static int pmz_detach(struct macio_dev *mdev)
{
	struct uart_pmac_port	*uap = dev_get_drvdata(&mdev->ofdev.dev);
	if (!uap)
		return -ENODEV;
	if (uap->flags & PMACZILOG_FLAG_RSRC_REQUESTED) {
		macio_release_resources(uap->dev);
		uap->flags &= ~PMACZILOG_FLAG_RSRC_REQUESTED;
	}
	dev_set_drvdata(&mdev->ofdev.dev, NULL);
	uap->dev = NULL;
	return 0;
}