aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/fdt.c7
-rw-r--r--drivers/sbus/char/openprom.c10
-rw-r--r--drivers/video/aty/atyfb_base.c2
3 files changed, 9 insertions, 10 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 616a4767a950..7f8861121a31 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -310,12 +310,11 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
310 __alignof__(struct property)); 310 __alignof__(struct property));
311 if (allnextpp) { 311 if (allnextpp) {
312 if (strcmp(pname, "linux,phandle") == 0) { 312 if (strcmp(pname, "linux,phandle") == 0) {
313 np->node = *((u32 *)*p); 313 if (np->phandle == 0)
314 if (np->linux_phandle == 0) 314 np->phandle = *((u32 *)*p);
315 np->linux_phandle = np->node;
316 } 315 }
317 if (strcmp(pname, "ibm,phandle") == 0) 316 if (strcmp(pname, "ibm,phandle") == 0)
318 np->linux_phandle = *((u32 *)*p); 317 np->phandle = *((u32 *)*p);
319 pp->name = pname; 318 pp->name = pname;
320 pp->length = sz; 319 pp->length = sz;
321 pp->value = (void *)*p; 320 pp->value = (void *)*p;
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;
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 913b4a47ae52..bb20987d58af 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -3104,7 +3104,7 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev,
3104 } 3104 }
3105 3105
3106 dp = pci_device_to_OF_node(pdev); 3106 dp = pci_device_to_OF_node(pdev);
3107 if (node == dp->node) { 3107 if (node == dp->phandle) {
3108 struct fb_var_screeninfo *var = &default_var; 3108 struct fb_var_screeninfo *var = &default_var;
3109 unsigned int N, P, Q, M, T, R; 3109 unsigned int N, P, Q, M, T, R;
3110 u32 v_total, h_total; 3110 u32 v_total, h_total;