Commit 1c372353 authored by Yinghai Lu's avatar Yinghai Lu Committed by Jesse Barnes

PCI: Move get_res_add_size() function

Need to call it from __assign_resources_sorted() later and we'd like to
avoid a forward declaraion.
Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent ef62dfef
......@@ -99,6 +99,21 @@ static void add_to_failed_list(struct resource_list_x *head,
0 /* dont care */);
}
static resource_size_t get_res_add_size(struct resource_list_x *realloc_head,
struct resource *res)
{
struct resource_list_x *list;
/* check if it is in realloc_head list */
for (list = realloc_head->next; list && list->res != res;
list = list->next)
;
if (list)
return list->add_size;
return 0;
}
static void __dev_sort_resources(struct pci_dev *dev,
struct resource_list *head)
{
......@@ -550,20 +565,6 @@ static resource_size_t calculate_memsize(resource_size_t size,
return size;
}
static resource_size_t get_res_add_size(struct resource_list_x *realloc_head,
struct resource *res)
{
struct resource_list_x *list;
/* check if it is in realloc_head list */
for (list = realloc_head->next; list && list->res != res;
list = list->next);
if (list)
return list->add_size;
return 0;
}
/**
* pbus_size_io() - size the io window of a given bus
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment