public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] resources: fill in type for __request_region()
@ 2010-05-04 18:58 Bjorn Helgaas
  2010-05-04 18:58 ` [PATCH 2/2] vgacon: use request_region(), not request_resource(), to set BUSY Bjorn Helgaas
  0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2010-05-04 18:58 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, H. Peter Anvin


Set the IORESOURCE_TYPE based on the parent.  Without this, the type is
never set, which is slightly confusing if we ever print the resource later.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
---

 kernel/resource.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/kernel/resource.c b/kernel/resource.c
index aa63746..f0d83a4 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -699,8 +699,9 @@ struct resource * __request_region(struct resource *parent,
 	res->name = name;
 	res->start = start;
 	res->end = start + n - 1;
-	res->flags = IORESOURCE_BUSY;
-	res->flags |= flags;
+	res->flags = parent->flags & IORESOURCE_TYPE_BITS;
+	res->flags |= (flags & ~IORESOURCE_TYPE_BITS);
+	res->flags |= IORESOURCE_BUSY;
 
 	write_lock(&resource_lock);
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-18 21:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 18:58 [PATCH 1/2] resources: fill in type for __request_region() Bjorn Helgaas
2010-05-04 18:58 ` [PATCH 2/2] vgacon: use request_region(), not request_resource(), to set BUSY Bjorn Helgaas
2010-05-04 19:09   ` Linus Torvalds
2010-05-04 19:16     ` Bjorn Helgaas
2010-05-04 20:14       ` H. Peter Anvin
2010-05-04 20:51         ` Jesse Barnes
2010-05-18 21:41         ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox