diff options
author | Ram Pai <linuxram@us.ibm.com> | 2011-02-14 17:43:19 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-03-04 10:46:16 -0800 |
commit | fc075e1da1b96ef65c32e83648055606b8204b58 (patch) | |
tree | 220297b578c15391b4190f0301db2e067f8f52ff /drivers/pci | |
parent | 094732a520caae81ae1532af29da82a4fa953472 (diff) | |
download | linux-fc075e1da1b96ef65c32e83648055606b8204b58.tar.bz2 |
PCI: introduce reset_resource()
Introduce reset_resource() which factors out resource reset logic.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/setup-bus.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index bcf5752f6907..a94ecc161208 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -88,6 +88,13 @@ static void __dev_sort_resources(struct pci_dev *dev, pdev_sort_resources(dev, head); } +static inline void reset_resource(struct resource *res) +{ + res->start = 0; + res->end = 0; + res->flags = 0; +} + static void __assign_resources_sorted(struct resource_list *head, struct resource_list_x *fail_head) { @@ -109,9 +116,7 @@ static void __assign_resources_sorted(struct resource_list *head, (!(res->flags & IORESOURCE_ROM_ENABLE)))) add_to_failed_list(fail_head, list->dev, res); } - res->start = 0; - res->end = 0; - res->flags = 0; + reset_resource(res); } tmp = list; list = list->next; |