Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316424
b: refs/heads/master
c: 5cc62c2
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Jun 13, 2012
1 parent aedaf49 commit 4a7a494
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3527ed81ca01bbaf09df952e68528377a9cd092f
refs/heads/master: 5cc62c202211096ec26309722ec27455d52c8726
30 changes: 30 additions & 0 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,36 @@
LIST_HEAD(pci_root_buses);
EXPORT_SYMBOL(pci_root_buses);

static LIST_HEAD(pci_domain_busn_res_list);

struct pci_domain_busn_res {
struct list_head list;
struct resource res;
int domain_nr;
};

static struct resource *get_pci_domain_busn_res(int domain_nr)
{
struct pci_domain_busn_res *r;

list_for_each_entry(r, &pci_domain_busn_res_list, list)
if (r->domain_nr == domain_nr)
return &r->res;

r = kzalloc(sizeof(*r), GFP_KERNEL);
if (!r)
return NULL;

r->domain_nr = domain_nr;
r->res.start = 0;
r->res.end = 0xff;
r->res.flags = IORESOURCE_BUS | IORESOURCE_PCI_FIXED;

list_add_tail(&r->list, &pci_domain_busn_res_list);

return &r->res;
}

static int find_anything(struct device *dev, void *data)
{
return 1;
Expand Down

0 comments on commit 4a7a494

Please sign in to comment.