diff options
-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 | { |