summaryrefslogtreecommitdiff
path: root/drivers/amba
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/amba')
-rw-r--r--drivers/amba/bus.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 768d973d0ded..f60b2b6a0931 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -208,6 +208,16 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
void __iomem *tmp;
int i, ret;
+ device_initialize(&dev->dev);
+
+ /*
+ * Copy from device_add
+ */
+ if (dev->dev.init_name) {
+ dev_set_name(&dev->dev, "%s", dev->dev.init_name);
+ dev->dev.init_name = NULL;
+ }
+
dev->dev.release = amba_device_release;
dev->dev.bus = &amba_bustype;
dev->dev.dma_mask = &dev->dma_mask;
@@ -250,7 +260,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
goto err_release;
}
- ret = device_register(&dev->dev);
+ ret = device_add(&dev->dev);
if (ret)
goto err_release;