/* Called upon match with an escc node in the devive-tree.  */
static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
/* Called upon match with an escc node in the devive-tree.  */
static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
{
	int i;
	for (i = 0; i < MAX_ZS_PORTS; i++)
		if (pmz_ports[i].node == mdev->ofdev.node) {
			struct uart_pmac_port *uap = &pmz_ports[i];
			uap->dev = mdev;
			dev_set_drvdata(&mdev->ofdev.dev, uap);
			if (macio_request_resources(uap->dev, "pmac_zilog"))
				printk(KERN_WARNING "%s: Failed to request resource"
				       ", port still active\n",
				       uap->node->name);
			else
				uap->flags |= PMACZILOG_FLAG_RSRC_REQUESTED;			return 0;
		}
	return -ENODEV;
}