diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-10-05 18:38:13 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-10-06 12:42:04 -0400 |
commit | b812cca4e2efe9a05de20ccf3f8587e7ac6e12fa (patch) | |
tree | 6c1c5f056e54daf14b10ec6e3461ea67f6e5d78a /drivers/pci/setup-res.c | |
parent | e3fb20f9c8783d6e27cf84389a9606e410733eef (diff) |
PCI: remove pci_assign_resource_fixed()
Adrian commented out this function in 2baad5f96b49, but I don't think
it's even worth cluttering the file with the unused code.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/setup-res.c')
-rw-r--r-- | drivers/pci/setup-res.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 706f82d8111f..c54526b206b5 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -205,43 +205,6 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
205 | return ret; | 205 | return ret; |
206 | } | 206 | } |
207 | 207 | ||
208 | #if 0 | ||
209 | int pci_assign_resource_fixed(struct pci_dev *dev, int resno) | ||
210 | { | ||
211 | struct pci_bus *bus = dev->bus; | ||
212 | struct resource *res = dev->resource + resno; | ||
213 | unsigned int type_mask; | ||
214 | int i, ret = -EBUSY; | ||
215 | |||
216 | type_mask = IORESOURCE_IO | IORESOURCE_MEM | IORESOURCE_PREFETCH; | ||
217 | |||
218 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | ||
219 | struct resource *r = bus->resource[i]; | ||
220 | if (!r) | ||
221 | continue; | ||
222 | |||
223 | /* type_mask must match */ | ||
224 | if ((res->flags ^ r->flags) & type_mask) | ||
225 | continue; | ||
226 | |||
227 | ret = request_resource(r, res); | ||
228 | |||
229 | if (ret == 0) | ||
230 | break; | ||
231 | } | ||
232 | |||
233 | if (ret) { | ||
234 | dev_err(&dev->dev, "BAR %d: can't allocate %s resource %pR\n", | ||
235 | resno, res->flags & IORESOURCE_IO ? "I/O" : "mem", res); | ||
236 | } else if (resno < PCI_BRIDGE_RESOURCES) { | ||
237 | pci_update_resource(dev, resno); | ||
238 | } | ||
239 | |||
240 | return ret; | ||
241 | } | ||
242 | EXPORT_SYMBOL_GPL(pci_assign_resource_fixed); | ||
243 | #endif | ||
244 | |||
245 | /* Sort resources by alignment */ | 208 | /* Sort resources by alignment */ |
246 | void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | 209 | void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) |
247 | { | 210 | { |