Lines Matching refs:dp
143 static int opromgetprop(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsi… in opromgetprop() argument
148 if (!dp || in opromgetprop()
149 !(pval = of_get_property(dp, op->oprom_array, &len)) || in opromgetprop()
160 static int opromnxtprop(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsi… in opromnxtprop() argument
165 if (!dp) in opromnxtprop()
168 prop = dp->properties; in opromnxtprop()
173 prop = of_find_property(dp, op->oprom_array, NULL); in opromnxtprop()
190 static int opromsetopt(struct device_node *dp, struct openpromio *op, int bufsize) in opromsetopt() argument
198 static int opromnext(void __user *argp, unsigned int cmd, struct device_node *dp, struct openpromio… in opromnext() argument
209 dp = of_find_node_by_phandle(ph); in opromnext()
210 if (!dp) in opromnext()
215 dp = dp->sibling; in opromnext()
219 dp = dp->child; in opromnext()
231 dp = of_find_node_by_path("/"); in opromnext()
235 if (dp) in opromnext()
236 ph = dp->phandle; in opromnext()
238 data->current_node = dp; in opromnext()
245 static int oprompci2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufs… in oprompci2node() argument
252 struct device_node *dp; in oprompci2node() local
257 dp = pci_device_to_OF_node(pdev); in oprompci2node()
258 data->current_node = dp; in oprompci2node()
259 *((int *)op->oprom_array) = dp->phandle; in oprompci2node()
270 static int oprompath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int buf… in oprompath2node() argument
274 dp = of_find_node_by_path(op->oprom_array); in oprompath2node()
275 if (dp) in oprompath2node()
276 ph = dp->phandle; in oprompath2node()
277 data->current_node = dp; in oprompath2node()
303 struct device_node *dp) in openprom_sunos_ioctl() argument
324 error = opromgetprop(argp, dp, opp, bufsize); in openprom_sunos_ioctl()
329 error = opromnxtprop(argp, dp, opp, bufsize); in openprom_sunos_ioctl()
334 error = opromsetopt(dp, opp, bufsize); in openprom_sunos_ioctl()
340 error = opromnext(argp, cmd, dp, opp, bufsize, data); in openprom_sunos_ioctl()
344 error = oprompci2node(argp, dp, opp, bufsize, data); in openprom_sunos_ioctl()
348 error = oprompath2node(argp, dp, opp, bufsize, data); in openprom_sunos_ioctl()
377 struct device_node *dp = of_find_node_by_phandle(n); in get_node() local
379 if (dp) in get_node()
380 data->lastnode = dp; in get_node()
382 return dp; in get_node()
415 struct device_node *dp; in opiocget() local
423 dp = get_node(op.op_nodeid, data); in opiocget()
429 pval = of_get_property(dp, str, &len); in opiocget()
447 struct device_node *dp; in opiocnextprop() local
455 dp = get_node(op.op_nodeid, data); in opiocnextprop()
456 if (!dp) in opiocnextprop()
464 prop = dp->properties; in opiocnextprop()
466 prop = of_find_property(dp, str, NULL); in opiocnextprop()
493 struct device_node *dp; in opiocset() local
500 dp = get_node(op.op_nodeid, data); in opiocset()
501 if (!dp) in opiocset()
514 err = of_set_property(dp, str, tmp, op.op_buflen); in opiocset()
524 struct device_node *dp; in opiocgetnext() local
535 dp = of_find_node_by_path("/"); in opiocgetnext()
537 dp = of_find_node_by_phandle(nd); in opiocgetnext()
539 if (dp) { in opiocgetnext()
541 dp = dp->sibling; in opiocgetnext()
543 dp = dp->child; in opiocgetnext()
546 if (dp) in opiocgetnext()
547 nd = dp->phandle; in opiocgetnext()
732 struct device_node *dp; in openprom_init() local
739 dp = of_find_node_by_path("/"); in openprom_init()
740 dp = dp->child; in openprom_init()
741 while (dp) { in openprom_init()
742 if (!strcmp(dp->name, "options")) in openprom_init()
744 dp = dp->sibling; in openprom_init()
746 options_node = dp; in openprom_init()