From: Jake Oshins Date: Tue, 5 Apr 2016 17:22:53 +0000 (-0700) Subject: drivers:hv: Reverse order of resources in hyperv_mmio X-Git-Tag: v4.7-rc1~92^2~90 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=23a0683186b7ca0083bfc76b410497f39a9d0351;p=karo-tx-linux.git drivers:hv: Reverse order of resources in hyperv_mmio A patch later in this series allocates child nodes in this resource tree. For that to work, this tree needs to be sorted in ascending order. Signed-off-by: Jake Oshins Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 60553c156f90..1ce47d03e800 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1049,7 +1049,6 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx) new_res->end = end; /* - * Stick ranges from higher in address space at the front of the list. * If two ranges are adjacent, merge them. */ do { @@ -1070,7 +1069,7 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx) break; } - if ((*old_res)->end < new_res->start) { + if ((*old_res)->start > new_res->end) { new_res->sibling = *old_res; if (prev_res) (*prev_res)->sibling = new_res;