summaryrefslogtreecommitdiffstats
path: root/drivers/pci/setup-bus.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-01-21 02:08:19 -0800
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-02-14 08:44:51 -0800
commit1c372353e9c681b127f21030f8a0f0c2afd82429 (patch)
tree5cbd91269d7cef2ae1b5a4a41ddd867919d65014 /drivers/pci/setup-bus.c
parentef62dfefa93bc90f1cb0f4a55c2d86b3269b3f92 (diff)
downloadlinux-1c372353e9c681b127f21030f8a0f0c2afd82429.tar.gz
linux-1c372353e9c681b127f21030f8a0f0c2afd82429.tar.bz2
linux-1c372353e9c681b127f21030f8a0f0c2afd82429.zip
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: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r--drivers/pci/setup-bus.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 0282fde43951..75d43eb37842 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -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
*