aboutsummaryrefslogtreecommitdiffstats
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)
208 void __iomem *tmp; 208 void __iomem *tmp;
209 int i, ret; 209 int i, ret;
210 210
211 device_initialize(&dev->dev);
212
213 /*
214 * Copy from device_add
215 */
216 if (dev->dev.init_name) {
217 dev_set_name(&dev->dev, "%s", dev->dev.init_name);
218 dev->dev.init_name = NULL;
219 }
220
211 dev->dev.release = amba_device_release; 221 dev->dev.release = amba_device_release;
212 dev->dev.bus = &amba_bustype; 222 dev->dev.bus = &amba_bustype;
213 dev->dev.dma_mask = &dev->dma_mask; 223 dev->dev.dma_mask = &dev->dma_mask;
@@ -250,7 +260,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
250 goto err_release; 260 goto err_release;
251 } 261 }
252 262
253 ret = device_register(&dev->dev); 263 ret = device_add(&dev->dev);
254 if (ret) 264 if (ret)
255 goto err_release; 265 goto err_release;
256 266