diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2004-02-06 14:35:38 +1100 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2004-02-06 14:35:38 +1100 |
| commit | 5360e74479478029fa456f4b4dfe916a4ed8e915 (patch) | |
| tree | 1e92474c2da761eb180c2373b952a8754508e6a5 | |
| parent | 3e74492e6c6cee6a96dadebda156982776ba4d5c (diff) | |
ppc32: refcounting fix for of_device.c
| -rw-r--r-- | arch/ppc/syslib/of_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ppc/syslib/of_device.c b/arch/ppc/syslib/of_device.c index b27a75f1b986..46269ed21aee 100644 --- a/arch/ppc/syslib/of_device.c +++ b/arch/ppc/syslib/of_device.c @@ -183,6 +183,7 @@ void of_release_dev(struct device *dev) struct of_device *ofdev; ofdev = to_of_device(dev); + of_node_put(ofdev->node); kfree(ofdev); } @@ -242,7 +243,7 @@ struct of_device* of_platform_device_create(struct device_node *np, const char * return NULL; memset(dev, 0, sizeof(*dev)); - dev->node = np; + dev->node = of_node_get(np); dev->dma_mask = 0xffffffffUL; dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = NULL; |
