diff options
author | Mark Brown <broonie@kernel.org> | 2014-10-20 12:55:07 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 13:27:32 -0400 |
commit | b7a40242c82cd73cfcea305f23e67d068dd8401a (patch) | |
tree | 251b49d19cd7c371847ae1f951e1b537ca0e1c15 /kernel/resource.c | |
parent | d26833bfce5e56017bea9f1f50838f20e18e7b7e (diff) | |
parent | 9c6de47d53a3ce8df1642ae67823688eb98a190a (diff) |
Merge branch 'fix/dw' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
Conflicts:
drivers/spi/spi-dw-mid.c
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)) |