mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Acked-by: David S. Miller <[email protected]> Tested-by: Wolfram Sang <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]>
This commit is contained in:
parent
923f7e30b4
commit
6016a363f6
16 changed files with 29 additions and 33 deletions
|
|
@ -233,7 +233,7 @@ static int opromnext(void __user *argp, unsigned int cmd, struct device_node *dp
|
|||
|
||||
ph = 0;
|
||||
if (dp)
|
||||
ph = dp->node;
|
||||
ph = dp->phandle;
|
||||
|
||||
data->current_node = dp;
|
||||
*((int *) op->oprom_array) = ph;
|
||||
|
|
@ -256,7 +256,7 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp
|
|||
|
||||
dp = pci_device_to_OF_node(pdev);
|
||||
data->current_node = dp;
|
||||
*((int *)op->oprom_array) = dp->node;
|
||||
*((int *)op->oprom_array) = dp->phandle;
|
||||
op->oprom_size = sizeof(int);
|
||||
err = copyout(argp, op, bufsize + sizeof(int));
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ static int oprompath2node(void __user *argp, struct device_node *dp, struct open
|
|||
|
||||
dp = of_find_node_by_path(op->oprom_array);
|
||||
if (dp)
|
||||
ph = dp->node;
|
||||
ph = dp->phandle;
|
||||
data->current_node = dp;
|
||||
*((int *)op->oprom_array) = ph;
|
||||
op->oprom_size = sizeof(int);
|
||||
|
|
@ -540,7 +540,7 @@ static int opiocgetnext(unsigned int cmd, void __user *argp)
|
|||
}
|
||||
}
|
||||
if (dp)
|
||||
nd = dp->node;
|
||||
nd = dp->phandle;
|
||||
if (copy_to_user(argp, &nd, sizeof(phandle)))
|
||||
return -EFAULT;
|
||||
|
||||
|
|
@ -570,7 +570,7 @@ static int openprom_bsd_ioctl(struct inode * inode, struct file * file,
|
|||
case OPIOCGETOPTNODE:
|
||||
BUILD_BUG_ON(sizeof(phandle) != sizeof(int));
|
||||
|
||||
if (copy_to_user(argp, &options_node->node, sizeof(phandle)))
|
||||
if (copy_to_user(argp, &options_node->phandle, sizeof(phandle)))
|
||||
return -EFAULT;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue