diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index a04498d..5962846 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -322,6 +322,25 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, goto out; } +int pci_read_base(struct pci_dev *dev, unsigned int reg, struct resource *res) +{ + struct pci_bus_region region; + struct resource *parent; + + //__pci_read_base(dev, reg, res); + __pci_read_base(dev, decode_bar(res, reg), res, reg); + + region.start = res->start; + region.end = res->end; + pcibios_bus_to_resource(dev, res, ®ion); + + parent = pci_find_parent_resource(dev, res); + if (!parent) + return -ENOENT; + return request_resource(parent, res); +} +EXPORT_SYMBOL_GPL(pci_read_base); + static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) { unsigned int pos, reg; diff --git a/mm/shmem.c b/mm/shmem.c index 04fb4f1..e6e88bd 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2582,6 +2582,7 @@ put_memory: shmem_unacct_size(flags, size); return ERR_PTR(error); } +EXPORT_SYMBOL_GPL(shmem_file_setup); /** * shmem_zero_setup - setup a shared anonymous mapping