aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/openprom.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-01-28 16:06:53 -0500
committerGrant Likely <grant.likely@secretlab.ca>2010-01-28 16:06:53 -0500
commit6016a363f6b56b46b24655bcfc0499b715851cf3 (patch)
treeaaca35be4765ec7c7d847bed702c121bbd1b8a81 /drivers/sbus/char/openprom.c
parent923f7e30b480438f1e86e01e5cde814248b59a39 (diff)
of: unify phandle name in struct device_node
In struct device_node, the phandle is named 'linux_phandle' for PowerPC and MicroBlaze, and 'node' for SPARC. There is no good reason for the difference, it is just an artifact of the code diverging over a couple of years. This patch renames both to simply .phandle. Note: the .node also existed in PowerPC/MicroBlaze, but the only user seems to be arch/powerpc/platforms/powermac/pfunc_core.c. It doesn't look like the assignment between .linux_phandle and .node is significantly different enough to warrant the separate code paths unless ibm,phandle properties actually appear in Apple device trees. I think it is safe to eliminate the old .node property and use phandle everywhere. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/sbus/char/openprom.c')
-rw-r--r--drivers/sbus/char/openprom.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 75ac19b1192f..fc2f676e984d 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -233,7 +233,7 @@ static int opromnext(void __user *argp, unsigned int cmd, struct device_node *dp
233 233
234 ph = 0; 234 ph = 0;
235 if (dp) 235 if (dp)
236 ph = dp->node; 236 ph = dp->phandle;
237 237
238 data->current_node = dp; 238 data->current_node = dp;
239 *((int *) op->oprom_array) = ph; 239 *((int *) op->oprom_array) = ph;
@@ -256,7 +256,7 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp
256 256
257 dp = pci_device_to_OF_node(pdev); 257 dp = pci_device_to_OF_node(pdev);
258 data->current_node = dp; 258 data->current_node = dp;
259 *((int *)op->oprom_array) = dp->node; 259 *((int *)op->oprom_array) = dp->phandle;
260 op->oprom_size = sizeof(int); 260 op->oprom_size = sizeof(int);
261 err = copyout(argp, op, bufsize + sizeof(int)); 261 err = copyout(argp, op, bufsize + sizeof(int));
262 262
@@ -273,7 +273,7 @@ static int oprompath2node(void __user *argp, struct device_node *dp, struct open
273 273
274 dp = of_find_node_by_path(op->oprom_array); 274 dp = of_find_node_by_path(op->oprom_array);
275 if (dp) 275 if (dp)
276 ph = dp->node; 276 ph = dp->phandle;
277 data->current_node = dp; 277 data->current_node = dp;
278 *((int *)op->oprom_array) = ph; 278 *((int *)op->oprom_array) = ph;
279 op->oprom_size = sizeof(int); 279 op->oprom_size = sizeof(int);
@@ -540,7 +540,7 @@ static int opiocgetnext(unsigned int cmd, void __user *argp)
540 } 540 }
541 } 541 }
542 if (dp) 542 if (dp)
543 nd = dp->node; 543 nd = dp->phandle;
544 if (copy_to_user(argp, &nd, sizeof(phandle))) 544 if (copy_to_user(argp, &nd, sizeof(phandle)))
545 return -EFAULT; 545 return -EFAULT;
546 546
@@ -570,7 +570,7 @@ static int openprom_bsd_ioctl(struct inode * inode, struct file * file,
570 case OPIOCGETOPTNODE: 570 case OPIOCGETOPTNODE:
571 BUILD_BUG_ON(sizeof(phandle) != sizeof(int)); 571 BUILD_BUG_ON(sizeof(phandle) != sizeof(int));
572 572
573 if (copy_to_user(argp, &options_node->node, sizeof(phandle))) 573 if (copy_to_user(argp, &options_node->phandle, sizeof(phandle)))
574 return -EFAULT; 574 return -EFAULT;
575 575
576 return 0; 576 return 0;