Skip to content

Commit

Permalink
PCI: introduce reset_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ram Pai authored and Jesse Barnes committed Mar 4, 2011
1 parent 094732a commit fc075e1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;
Expand Down

0 comments on commit fc075e1

Please sign in to comment.