diff options
| -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, | |||
| 88 | pdev_sort_resources(dev, head); | 88 | pdev_sort_resources(dev, head); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | static inline void reset_resource(struct resource *res) | ||
| 92 | { | ||
| 93 | res->start = 0; | ||
| 94 | res->end = 0; | ||
| 95 | res->flags = 0; | ||
| 96 | } | ||
| 97 | |||
| 91 | static void __assign_resources_sorted(struct resource_list *head, | 98 | static void __assign_resources_sorted(struct resource_list *head, |
| 92 | struct resource_list_x *fail_head) | 99 | struct resource_list_x *fail_head) |
| 93 | { | 100 | { |
| @@ -109,9 +116,7 @@ static void __assign_resources_sorted(struct resource_list *head, | |||
| 109 | (!(res->flags & IORESOURCE_ROM_ENABLE)))) | 116 | (!(res->flags & IORESOURCE_ROM_ENABLE)))) |
| 110 | add_to_failed_list(fail_head, list->dev, res); | 117 | add_to_failed_list(fail_head, list->dev, res); |
| 111 | } | 118 | } |
| 112 | res->start = 0; | 119 | reset_resource(res); |
| 113 | res->end = 0; | ||
| 114 | res->flags = 0; | ||
| 115 | } | 120 | } |
| 116 | tmp = list; | 121 | tmp = list; |
| 117 | list = list->next; | 122 | list = list->next; |
