diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 14:52:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 14:52:52 -0400 |
commit | 08acd4f8af42affd8cbed81cc1b69fa12ddb213f (patch) | |
tree | 988d15db6233b20db6a500cd5f590c6d2041462d /drivers/pnp/quirks.c | |
parent | ccf2779544eecfcc5447e2028d1029b6d4ff7bb6 (diff) | |
parent | 008238b54ac2350babf195084ecedbcf7851a202 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (179 commits)
ACPI: Fix acpi_processor_idle and idle= boot parameters interaction
acpi: fix section mismatch warning in pnpacpi
intel_menlo: fix build warning
ACPI: Cleanup: Remove unneeded, multiple local dummy variables
ACPI: video - fix permissions on some proc entries
ACPI: video - properly handle errors when registering proc elements
ACPI: video - do not store invalid entries in attached_array list
ACPI: re-name acpi_pm_ops to acpi_suspend_ops
ACER_WMI/ASUS_LAPTOP: fix build bug
thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed
ACPI: check a return value correctly in acpi_power_get_context()
#if 0 acpi/bay.c:eject_removable_drive()
eeepc-laptop: add hwmon fan control
eeepc-laptop: add backlight
eeepc-laptop: add base driver
ACPI: thinkpad-acpi: bump up version to 0.20
ACPI: thinkpad-acpi: fix selects in Kconfig
ACPI: thinkpad-acpi: use a private workqueue
ACPI: thinkpad-acpi: fluff really minor fix
ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation
...
Fixed conflicts in drivers/acpi/video.c and drivers/misc/intel_menlow.c
manually.
Diffstat (limited to 'drivers/pnp/quirks.c')
-rw-r--r-- | drivers/pnp/quirks.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index e4daf4635c48..d049a2279fea 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c | |||
@@ -117,6 +117,7 @@ static void quirk_sb16audio_resources(struct pnp_dev *dev) | |||
117 | static void quirk_system_pci_resources(struct pnp_dev *dev) | 117 | static void quirk_system_pci_resources(struct pnp_dev *dev) |
118 | { | 118 | { |
119 | struct pci_dev *pdev = NULL; | 119 | struct pci_dev *pdev = NULL; |
120 | struct resource *res; | ||
120 | resource_size_t pnp_start, pnp_end, pci_start, pci_end; | 121 | resource_size_t pnp_start, pnp_end, pci_start, pci_end; |
121 | int i, j; | 122 | int i, j; |
122 | 123 | ||
@@ -137,13 +138,15 @@ static void quirk_system_pci_resources(struct pnp_dev *dev) | |||
137 | 138 | ||
138 | pci_start = pci_resource_start(pdev, i); | 139 | pci_start = pci_resource_start(pdev, i); |
139 | pci_end = pci_resource_end(pdev, i); | 140 | pci_end = pci_resource_end(pdev, i); |
140 | for (j = 0; j < PNP_MAX_MEM; j++) { | 141 | for (j = 0; |
141 | if (!pnp_mem_valid(dev, j) || | 142 | (res = pnp_get_resource(dev, IORESOURCE_MEM, j)); |
142 | pnp_mem_len(dev, j) == 0) | 143 | j++) { |
144 | if (res->flags & IORESOURCE_UNSET || | ||
145 | (res->start == 0 && res->end == 0)) | ||
143 | continue; | 146 | continue; |
144 | 147 | ||
145 | pnp_start = pnp_mem_start(dev, j); | 148 | pnp_start = res->start; |
146 | pnp_end = pnp_mem_end(dev, j); | 149 | pnp_end = res->end; |
147 | 150 | ||
148 | /* | 151 | /* |
149 | * If the PNP region doesn't overlap the PCI | 152 | * If the PNP region doesn't overlap the PCI |
@@ -176,7 +179,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev) | |||
176 | pci_name(pdev), i, | 179 | pci_name(pdev), i, |
177 | (unsigned long long) pci_start, | 180 | (unsigned long long) pci_start, |
178 | (unsigned long long) pci_end); | 181 | (unsigned long long) pci_end); |
179 | pnp_mem_flags(dev, j) = 0; | 182 | res->flags = 0; |
180 | } | 183 | } |
181 | } | 184 | } |
182 | } | 185 | } |