/* Setup the AMBA device, reading the cell ID if present. Claim the resource, and register the AMBA device with the Linux device manager.  */
int amba_device_register(struct amba_device *dev, struct resource *parent)
/* Setup the AMBA device, reading the cell ID if present. Claim the resource, and register the AMBA device with the Linux device manager.  */
int amba_device_register(struct amba_device *dev, struct resource *parent)
{
	amba_device_initialize(dev, dev->dev.init_name);
	dev->dev.init_name = NULL;
	if (!dev->dev.coherent_dma_mask && dev->dma_mask)
		dev_warn(&dev->dev, "coherent dma mask is unset\n");
	return amba_device_add(dev, parent);
}