Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946947Ab2ERXSj (ORCPT ); Fri, 18 May 2012 19:18:39 -0400 Received: from mail-qa0-f74.google.com ([209.85.216.74]:48533 "EHLO mail-qa0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946599Ab2ERXSe (ORCPT ); Fri, 18 May 2012 19:18:34 -0400 Subject: [PATCH 1/2] resources: set type of new resource returned by __request_region() To: David Woodhouse From: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Ingo Molnar , Suresh Siddha Date: Fri, 18 May 2012 17:18:32 -0600 Message-ID: <20120518231832.31187.10630.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20120518231238.31187.44571.stgit@bhelgaas.mtv.corp.google.com> References: <20120518231238.31187.44571.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1030 Lines: 30 Previously we returned a new struct resource with only IORESOURCE_BUSY set (and possibly IORESOURCE_MUXED or IORESOURCE_EXCLUSIVE), but no MEM/IO/etc. bits set. The new resource should inherit the type of its parent. Signed-off-by: Bjorn Helgaas --- kernel/resource.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c index 7e8ea66..04bb527 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -847,7 +847,8 @@ struct resource * __request_region(struct resource *parent, res->name = name; res->start = start; res->end = start + n - 1; - res->flags = IORESOURCE_BUSY; + res->flags = parent->flags; + res->flags |= IORESOURCE_BUSY; res->flags |= flags; write_lock(&resource_lock); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/