diff options
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/openprom.c | 10 |
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; |