diff options
Diffstat (limited to 'kernel/resource.c')
| -rw-r--r-- | kernel/resource.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index da14b8d09296..60c5a3856ab7 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
| @@ -351,15 +351,12 @@ static int find_next_iomem_res(struct resource *res, char *name, | |||
| 351 | end = res->end; | 351 | end = res->end; |
| 352 | BUG_ON(start >= end); | 352 | BUG_ON(start >= end); |
| 353 | 353 | ||
| 354 | read_lock(&resource_lock); | 354 | if (first_level_children_only) |
| 355 | |||
| 356 | if (first_level_children_only) { | ||
| 357 | p = iomem_resource.child; | ||
| 358 | sibling_only = true; | 355 | sibling_only = true; |
| 359 | } else | ||
| 360 | p = &iomem_resource; | ||
| 361 | 356 | ||
| 362 | while ((p = next_resource(p, sibling_only))) { | 357 | read_lock(&resource_lock); |
| 358 | |||
| 359 | for (p = iomem_resource.child; p; p = next_resource(p, sibling_only)) { | ||
| 363 | if (p->flags != res->flags) | 360 | if (p->flags != res->flags) |
| 364 | continue; | 361 | continue; |
| 365 | if (name && strcmp(p->name, name)) | 362 | if (name && strcmp(p->name, name)) |
