diff options
Diffstat (limited to 'drivers/of/platform.c')
| -rw-r--r-- | drivers/of/platform.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 63b3ec48c203..343ad29e211c 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
| @@ -55,7 +55,7 @@ EXPORT_SYMBOL(of_find_device_by_node); | |||
| 55 | #include <asm/dcr.h> | 55 | #include <asm/dcr.h> |
| 56 | #endif | 56 | #endif |
| 57 | 57 | ||
| 58 | #if !defined(CONFIG_SPARC) | 58 | #ifdef CONFIG_OF_ADDRESS |
| 59 | /* | 59 | /* |
| 60 | * The following routines scan a subtree and registers a device for | 60 | * The following routines scan a subtree and registers a device for |
| 61 | * each applicable node. | 61 | * each applicable node. |
| @@ -253,7 +253,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node, | |||
| 253 | if (!of_device_is_available(node)) | 253 | if (!of_device_is_available(node)) |
| 254 | return NULL; | 254 | return NULL; |
| 255 | 255 | ||
| 256 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); | 256 | dev = amba_device_alloc(NULL, 0, 0); |
| 257 | if (!dev) | 257 | if (!dev) |
| 258 | return NULL; | 258 | return NULL; |
| 259 | 259 | ||
| @@ -283,14 +283,14 @@ static struct amba_device *of_amba_device_create(struct device_node *node, | |||
| 283 | if (ret) | 283 | if (ret) |
| 284 | goto err_free; | 284 | goto err_free; |
| 285 | 285 | ||
| 286 | ret = amba_device_register(dev, &iomem_resource); | 286 | ret = amba_device_add(dev, &iomem_resource); |
| 287 | if (ret) | 287 | if (ret) |
| 288 | goto err_free; | 288 | goto err_free; |
| 289 | 289 | ||
| 290 | return dev; | 290 | return dev; |
| 291 | 291 | ||
| 292 | err_free: | 292 | err_free: |
| 293 | kfree(dev); | 293 | amba_device_put(dev); |
| 294 | return NULL; | 294 | return NULL; |
| 295 | } | 295 | } |
| 296 | #else /* CONFIG_ARM_AMBA */ | 296 | #else /* CONFIG_ARM_AMBA */ |
| @@ -462,4 +462,4 @@ int of_platform_populate(struct device_node *root, | |||
| 462 | of_node_put(root); | 462 | of_node_put(root); |
| 463 | return rc; | 463 | return rc; |
| 464 | } | 464 | } |
| 465 | #endif /* !CONFIG_SPARC */ | 465 | #endif /* CONFIG_OF_ADDRESS */ |
