diff options
Diffstat (limited to 'drivers/pci')
| -rw-r--r-- | drivers/pci/hotplug/rpadlpar_core.c | 6 | ||||
| -rw-r--r-- | drivers/pci/pci-sysfs.c | 2 | ||||
| -rw-r--r-- | drivers/pci/probe.c | 12 | ||||
| -rw-r--r-- | drivers/pci/proc.c | 2 | ||||
| -rw-r--r-- | drivers/pci/search.c | 4 |
5 files changed, 19 insertions, 7 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index bb3c101c2c5a..deb6b5e35feb 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c | |||
| @@ -159,8 +159,8 @@ static void dlpar_pci_add_bus(struct device_node *dn) | |||
| 159 | /* Claim new bus resources */ | 159 | /* Claim new bus resources */ |
| 160 | pcibios_claim_one_bus(dev->bus); | 160 | pcibios_claim_one_bus(dev->bus); |
| 161 | 161 | ||
| 162 | /* ioremap() for child bus, which may or may not succeed */ | 162 | /* Map IO space for child bus, which may or may not succeed */ |
| 163 | remap_bus_range(dev->subordinate); | 163 | pcibios_map_io_space(dev->subordinate); |
| 164 | 164 | ||
| 165 | /* Add new devices to global lists. Register in proc, sysfs. */ | 165 | /* Add new devices to global lists. Register in proc, sysfs. */ |
| 166 | pci_bus_add_devices(phb->bus); | 166 | pci_bus_add_devices(phb->bus); |
| @@ -390,7 +390,7 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) | |||
| 390 | } else | 390 | } else |
| 391 | pcibios_remove_pci_devices(bus); | 391 | pcibios_remove_pci_devices(bus); |
| 392 | 392 | ||
| 393 | if (unmap_bus_range(bus)) { | 393 | if (pcibios_unmap_io_space(bus)) { |
| 394 | printk(KERN_ERR "%s: failed to unmap bus range\n", | 394 | printk(KERN_ERR "%s: failed to unmap bus range\n", |
| 395 | __FUNCTION__); | 395 | __FUNCTION__); |
| 396 | return -ERANGE; | 396 | return -ERANGE; |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 10dbdec80416..1b7b2812bf2d 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #include <linux/stat.h> | 20 | #include <linux/stat.h> |
| 21 | #include <linux/topology.h> | 21 | #include <linux/topology.h> |
| 22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
| 23 | 23 | #include <linux/capability.h> | |
| 24 | #include "pci.h" | 24 | #include "pci.h" |
| 25 | 25 | ||
| 26 | static int sysfs_initialized; /* = 0 */ | 26 | static int sysfs_initialized; /* = 0 */ |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index a7bce75c6732..34b8dae0d90f 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
| @@ -22,6 +22,18 @@ EXPORT_SYMBOL(pci_root_buses); | |||
| 22 | 22 | ||
| 23 | LIST_HEAD(pci_devices); | 23 | LIST_HEAD(pci_devices); |
| 24 | 24 | ||
| 25 | /* | ||
| 26 | * Some device drivers need know if pci is initiated. | ||
| 27 | * Basically, we think pci is not initiated when there | ||
| 28 | * is no device in list of pci_devices. | ||
| 29 | */ | ||
| 30 | int no_pci_devices(void) | ||
| 31 | { | ||
| 32 | return list_empty(&pci_devices); | ||
| 33 | } | ||
| 34 | |||
| 35 | EXPORT_SYMBOL(no_pci_devices); | ||
| 36 | |||
| 25 | #ifdef HAVE_PCI_LEGACY | 37 | #ifdef HAVE_PCI_LEGACY |
| 26 | /** | 38 | /** |
| 27 | * pci_create_legacy_files - create legacy I/O port and memory files | 39 | * pci_create_legacy_files - create legacy I/O port and memory files |
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index cfa0dfe61b1a..90adc62d07ff 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/proc_fs.h> | 12 | #include <linux/proc_fs.h> |
| 13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
| 14 | 14 | #include <linux/capability.h> | |
| 15 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
| 16 | #include <asm/byteorder.h> | 16 | #include <asm/byteorder.h> |
| 17 | #include "pci.h" | 17 | #include "pci.h" |
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 9f7090fa8771..c6e79d01ce3d 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
| @@ -202,7 +202,7 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor, | |||
| 202 | * can cause some machines to crash. So here we detect and flag that | 202 | * can cause some machines to crash. So here we detect and flag that |
| 203 | * situation and bail out early. | 203 | * situation and bail out early. |
| 204 | */ | 204 | */ |
| 205 | if (unlikely(list_empty(&pci_devices))) | 205 | if (unlikely(no_pci_devices())) |
| 206 | return NULL; | 206 | return NULL; |
| 207 | down_read(&pci_bus_sem); | 207 | down_read(&pci_bus_sem); |
| 208 | n = from ? from->global_list.next : pci_devices.next; | 208 | n = from ? from->global_list.next : pci_devices.next; |
| @@ -277,7 +277,7 @@ pci_get_subsys(unsigned int vendor, unsigned int device, | |||
| 277 | * can cause some machines to crash. So here we detect and flag that | 277 | * can cause some machines to crash. So here we detect and flag that |
| 278 | * situation and bail out early. | 278 | * situation and bail out early. |
| 279 | */ | 279 | */ |
| 280 | if (unlikely(list_empty(&pci_devices))) | 280 | if (unlikely(no_pci_devices())) |
| 281 | return NULL; | 281 | return NULL; |
| 282 | down_read(&pci_bus_sem); | 282 | down_read(&pci_bus_sem); |
| 283 | n = from ? from->global_list.next : pci_devices.next; | 283 | n = from ? from->global_list.next : pci_devices.next; |
