summaryrefslogtreecommitdiffstats
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-27 20:10:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-27 20:10:05 +0200
commit6e64e22449023dc89dfb92c6f19d4c5b03f46889 (patch)
treec0099a75238a2cdcedf005956963329eee0aac75 /kernel/resource.c
parentstaging: lustre: Replace strtoul with simple_strtoul (diff)
parentLinux 4.2-rc4 (diff)
downloadlinux-6e64e22449023dc89dfb92c6f19d4c5b03f46889.tar.xz
linux-6e64e22449023dc89dfb92c6f19d4c5b03f46889.zip
Merge 4.2-rc4 into staging-next
We want the iio and other fixes in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 90552aab5f2d..fed052a1bc9f 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -504,13 +504,13 @@ int region_is_ram(resource_size_t start, unsigned long size)
{
struct resource *p;
resource_size_t end = start + size - 1;
- int flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+ unsigned long flags = IORESOURCE_MEM | IORESOURCE_BUSY;
const char *name = "System RAM";
int ret = -1;
read_lock(&resource_lock);
for (p = iomem_resource.child; p ; p = p->sibling) {
- if (end < p->start)
+ if (p->end < start)
continue;
if (p->start <= start && end <= p->end) {
@@ -521,7 +521,7 @@ int region_is_ram(resource_size_t start, unsigned long size)
ret = 1;
break;
}
- if (p->end < start)
+ if (end < p->start)
break; /* not found */
}
read_unlock(&resource_lock);