Lines Matching refs:p
64 static struct resource *next_resource(struct resource *p, bool sibling_only) in next_resource() argument
68 return p->sibling; in next_resource()
70 if (p->child) in next_resource()
71 return p->child; in next_resource()
72 while (!p->sibling && p->parent) in next_resource()
73 p = p->parent; in next_resource()
74 return p->sibling; in next_resource()
79 struct resource *p = v; in r_next() local
81 return (void *)next_resource(p, false); in r_next()
91 struct resource *p = PDE_DATA(file_inode(m->file)); in r_start() local
94 for (p = p->child; p && l < *pos; p = r_next(m, p, &l)) in r_start()
96 return p; in r_start()
108 struct resource *r = v, *p; in r_show() local
113 for (depth = 0, p = r; depth < MAX_IORES_LEVEL; depth++, p = p->parent) in r_show()
114 if (p->parent == root) in r_show()
189 struct resource *tmp, **p; in __request_resource() local
197 p = &root->child; in __request_resource()
199 tmp = *p; in __request_resource()
202 *p = new; in __request_resource()
206 p = &tmp->sibling; in __request_resource()
215 struct resource *tmp, **p, *chd; in __release_resource() local
217 p = &old->parent->child; in __release_resource()
219 tmp = *p; in __release_resource()
224 *p = tmp->sibling; in __release_resource()
231 *p = tmp->child; in __release_resource()
237 p = &tmp->sibling; in __release_resource()
244 struct resource *tmp, *p; in __release_child_resources() local
247 p = r->child; in __release_child_resources()
249 while (p) { in __release_child_resources()
250 tmp = p; in __release_child_resources()
251 p = p->sibling; in __release_child_resources()
346 struct resource *p; in find_next_iomem_res() local
356 for (p = iomem_resource.child; p; p = next_resource(p, siblings_only)) { in find_next_iomem_res()
358 if (p->start > end) { in find_next_iomem_res()
359 p = NULL; in find_next_iomem_res()
364 if (p->end < start) in find_next_iomem_res()
374 if ((p->flags & flags) != flags) in find_next_iomem_res()
376 if ((desc != IORES_DESC_NONE) && (desc != p->desc)) in find_next_iomem_res()
383 if (p) { in find_next_iomem_res()
385 res->start = max(start, p->start); in find_next_iomem_res()
386 res->end = min(end, p->end); in find_next_iomem_res()
387 res->flags = p->flags; in find_next_iomem_res()
388 res->desc = p->desc; in find_next_iomem_res()
392 return p ? 0 : -ENODEV; in find_next_iomem_res()
541 struct resource *p; in region_intersects() local
547 for (p = iomem_resource.child; p ; p = p->sibling) { in region_intersects()
548 bool is_type = (((p->flags & flags) == flags) && in region_intersects()
550 (desc == p->desc))); in region_intersects()
552 if (resource_overlaps(p, &res)) in region_intersects()
1194 struct resource **p; in __release_region() local
1197 p = &parent->child; in __release_region()
1203 struct resource *res = *p; in __release_region()
1209 p = &res->child; in __release_region()
1214 *p = res->sibling; in __release_region()
1221 p = &res->sibling; in __release_region()
1256 struct resource **p; in release_mem_region_adjustable() local
1269 p = &parent->child; in release_mem_region_adjustable()
1272 while ((res = *p)) { in release_mem_region_adjustable()
1278 p = &res->sibling; in release_mem_region_adjustable()
1301 p = &res->child; in release_mem_region_adjustable()
1308 *p = res->sibling; in release_mem_region_adjustable()
1534 struct resource *p = &iomem_resource; in iomem_map_sanity_check() local
1539 for (p = p->child; p ; p = r_next(NULL, p, &l)) { in iomem_map_sanity_check()
1544 if (p->start >= addr + size) in iomem_map_sanity_check()
1546 if (p->end < addr) in iomem_map_sanity_check()
1548 if (PFN_DOWN(p->start) <= PFN_DOWN(addr) && in iomem_map_sanity_check()
1549 PFN_DOWN(p->end) >= PFN_DOWN(addr + size - 1)) in iomem_map_sanity_check()
1557 if (p->flags & IORESOURCE_BUSY) in iomem_map_sanity_check()
1563 p->name, p); in iomem_map_sanity_check()
1584 struct resource *p = &iomem_resource; in iomem_is_exclusive() local
1595 for (p = p->child; p ; p = r_next(NULL, p, &l)) { in iomem_is_exclusive()
1600 if (p->start >= addr + size) in iomem_is_exclusive()
1602 if (p->end < addr) in iomem_is_exclusive()
1609 if ((p->flags & IORESOURCE_BUSY) == 0) in iomem_is_exclusive()
1612 || p->flags & IORESOURCE_EXCLUSIVE) { in iomem_is_exclusive()