diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-18 14:15:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-18 14:15:05 -0500 |
commit | 4092762aebfe55c1f8e31440b80a053c2dbe519b (patch) | |
tree | 8fb9fd14131194174c12daf5d8195afd3b62bc3e /drivers/pci | |
parent | 745b1626dd71ce9661a05ea4db57859ed5c773d2 (diff) | |
parent | 1de9e8e70f5acc441550ca75433563d91b269bbe (diff) |
Merge branch 'tracing/ftrace'; commit 'v2.6.29-rc2' into tracing/core
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 2 | ||||
-rw-r--r-- | drivers/pci/intel-iommu.c | 3 | ||||
-rw-r--r-- | drivers/pci/pci.c | 8 | ||||
-rw-r--r-- | drivers/pci/syscall.c | 12 |
4 files changed, 10 insertions, 15 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index f09b1010d477..803d9ddd6e75 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -266,6 +266,8 @@ static int detect_ejectable_slots(struct pci_bus *pbus) | |||
266 | int found = acpi_pci_detect_ejectable(pbus); | 266 | int found = acpi_pci_detect_ejectable(pbus); |
267 | if (!found) { | 267 | if (!found) { |
268 | acpi_handle bridge_handle = acpi_pci_get_bridge_handle(pbus); | 268 | acpi_handle bridge_handle = acpi_pci_get_bridge_handle(pbus); |
269 | if (!bridge_handle) | ||
270 | return 0; | ||
269 | acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, (u32)1, | 271 | acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, (u32)1, |
270 | is_pci_dock_device, (void *)&found, NULL); | 272 | is_pci_dock_device, (void *)&found, NULL); |
271 | } | 273 | } |
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 235fb7a5a8a5..3dfecb20d5e7 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -438,7 +438,8 @@ static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn) | |||
438 | continue; | 438 | continue; |
439 | 439 | ||
440 | for (i = 0; i < drhd->devices_cnt; i++) | 440 | for (i = 0; i < drhd->devices_cnt; i++) |
441 | if (drhd->devices[i]->bus->number == bus && | 441 | if (drhd->devices[i] && |
442 | drhd->devices[i]->bus->number == bus && | ||
442 | drhd->devices[i]->devfn == devfn) | 443 | drhd->devices[i]->devfn == devfn) |
443 | return drhd->iommu; | 444 | return drhd->iommu; |
444 | 445 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index c12f6c790698..e491fdedf705 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1260,15 +1260,14 @@ void pci_pm_init(struct pci_dev *dev) | |||
1260 | /* find PCI PM capability in list */ | 1260 | /* find PCI PM capability in list */ |
1261 | pm = pci_find_capability(dev, PCI_CAP_ID_PM); | 1261 | pm = pci_find_capability(dev, PCI_CAP_ID_PM); |
1262 | if (!pm) | 1262 | if (!pm) |
1263 | goto Exit; | 1263 | return; |
1264 | |||
1265 | /* Check device's ability to generate PME# */ | 1264 | /* Check device's ability to generate PME# */ |
1266 | pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc); | 1265 | pci_read_config_word(dev, pm + PCI_PM_PMC, &pmc); |
1267 | 1266 | ||
1268 | if ((pmc & PCI_PM_CAP_VER_MASK) > 3) { | 1267 | if ((pmc & PCI_PM_CAP_VER_MASK) > 3) { |
1269 | dev_err(&dev->dev, "unsupported PM cap regs version (%u)\n", | 1268 | dev_err(&dev->dev, "unsupported PM cap regs version (%u)\n", |
1270 | pmc & PCI_PM_CAP_VER_MASK); | 1269 | pmc & PCI_PM_CAP_VER_MASK); |
1271 | goto Exit; | 1270 | return; |
1272 | } | 1271 | } |
1273 | 1272 | ||
1274 | dev->pm_cap = pm; | 1273 | dev->pm_cap = pm; |
@@ -1307,9 +1306,6 @@ void pci_pm_init(struct pci_dev *dev) | |||
1307 | } else { | 1306 | } else { |
1308 | dev->pme_support = 0; | 1307 | dev->pme_support = 0; |
1309 | } | 1308 | } |
1310 | |||
1311 | Exit: | ||
1312 | pci_update_current_state(dev, PCI_D0); | ||
1313 | } | 1309 | } |
1314 | 1310 | ||
1315 | /** | 1311 | /** |
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c index 645d7a60e412..ec22284eed30 100644 --- a/drivers/pci/syscall.c +++ b/drivers/pci/syscall.c | |||
@@ -14,10 +14,8 @@ | |||
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include "pci.h" | 15 | #include "pci.h" |
16 | 16 | ||
17 | asmlinkage long | 17 | SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn, |
18 | sys_pciconfig_read(unsigned long bus, unsigned long dfn, | 18 | unsigned long, off, unsigned long, len, void __user *, buf) |
19 | unsigned long off, unsigned long len, | ||
20 | void __user *buf) | ||
21 | { | 19 | { |
22 | struct pci_dev *dev; | 20 | struct pci_dev *dev; |
23 | u8 byte; | 21 | u8 byte; |
@@ -86,10 +84,8 @@ error: | |||
86 | return err; | 84 | return err; |
87 | } | 85 | } |
88 | 86 | ||
89 | asmlinkage long | 87 | SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn, |
90 | sys_pciconfig_write(unsigned long bus, unsigned long dfn, | 88 | unsigned long, off, unsigned long, len, void __user *, buf) |
91 | unsigned long off, unsigned long len, | ||
92 | void __user *buf) | ||
93 | { | 89 | { |
94 | struct pci_dev *dev; | 90 | struct pci_dev *dev; |
95 | u8 byte; | 91 | u8 byte; |