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 3d763fdf99b7..246650673010 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -207,6 +207,16 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
207 void __iomem *tmp; 207 void __iomem *tmp;
208 int i, ret; 208 int i, ret;
209 209
210 device_initialize(&dev->dev);
211
212 /*
213 * Copy from device_add
214 */
215 if (dev->dev.init_name) {
216 dev_set_name(&dev->dev, "%s", dev->dev.init_name);
217 dev->dev.init_name = NULL;
218 }
219
210 dev->dev.release = amba_device_release; 220 dev->dev.release = amba_device_release;
211 dev->dev.bus = &amba_bustype; 221 dev->dev.bus = &amba_bustype;
212 dev->dev.dma_mask = &dev->dma_mask; 222 dev->dev.dma_mask = &dev->dma_mask;
@@ -240,7 +250,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
240 goto err_release; 250 goto err_release;
241 } 251 }
242 252
243 ret = device_register(&dev->dev); 253 ret = device_add(&dev->dev);
244 if (ret) 254 if (ret)
245 goto err_release; 255 goto err_release;
246 256