summaryrefslogtreecommitdiff
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-09-22 12:12:16 +0400
committerTakashi Iwai <tiwai@suse.de>2014-09-22 12:12:16 +0400
commit7639913f7298ed23a3f026ebcbb3b4e8850bcc39 (patch)
tree26f08f061535015b748a96106f4869560e3afc63 /kernel/resource.c
parent4e9c58cb1219bcbcf6e698ed6541b275048bfa88 (diff)
parentf8fb117034847634bff8f02632151f7535981fa1 (diff)
downloadlinux-7639913f7298ed23a3f026ebcbb3b4e8850bcc39.tar.xz
Merge branch 'topic/hda-jack-rework' into for-next
This is a merge of rework of HD-audio jack event handling code. It extends the jack table to allow multiple callbacks.
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c11
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,
end = res->end;
BUG_ON(start >= end);
- read_lock(&resource_lock);
-
- if (first_level_children_only) {
- p = iomem_resource.child;
+ if (first_level_children_only)
sibling_only = true;
- } else
- p = &iomem_resource;
- while ((p = next_resource(p, sibling_only))) {
+ read_lock(&resource_lock);
+
+ for (p = iomem_resource.child; p; p = next_resource(p, sibling_only)) {
if (p->flags != res->flags)
continue;
if (name && strcmp(p->name, name))