mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 01:20:52 +07:00
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>
This commit is contained in:
parent
094732a520
commit
fc075e1da1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user