summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/mobility.c
diff options
context:
space:
mode:
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>2013-08-15 05:23:50 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-27 04:45:14 (GMT)
commit8d5ff320766f051341835c761a2fc125e5b24e9f (patch)
tree8b2c31901ce39734225e7e1069cc66dff1a0e5f5 /arch/powerpc/platforms/pseries/mobility.c
parent1578cb76d46c9735a740c919cb9b7e5d1ba92420 (diff)
downloadlinux-fsl-qoriq-8d5ff320766f051341835c761a2fc125e5b24e9f.tar.xz
powerpc/pseries: Make dlpar_configure_connector parent node aware
Currently the device nodes created in the device subtree returned by a call to dlpar_configure_connector are all named in the root node. This is because the the node name in the work area returned by ibm,configure-connector rtas call only contains the node name and not the entire node path. Passing the parent node where the new subtree will be created to dlpar_configure_connector allows the correct node path to be prefixed in the full_name field. Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/mobility.c')
-rw-r--r--arch/powerpc/platforms/pseries/mobility.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index ed5426f..ff102e2 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -216,17 +216,14 @@ static int add_dt_node(u32 parent_phandle, u32 drc_index)
struct device_node *parent_dn;
int rc;
- dn = dlpar_configure_connector(drc_index);
- if (!dn)
+ parent_dn = of_find_node_by_phandle(parent_phandle);
+ if (!parent_dn)
return -ENOENT;
- parent_dn = of_find_node_by_phandle(parent_phandle);
- if (!parent_dn) {
- dlpar_free_cc_nodes(dn);
+ dn = dlpar_configure_connector(drc_index, parent_dn);
+ if (!dn)
return -ENOENT;
- }
- dn->parent = parent_dn;
rc = dlpar_attach_node(dn);
if (rc)
dlpar_free_cc_nodes(dn);