diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-05-10 09:32:46 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-05-10 09:32:46 -0400 |
commit | 0ae28a35bcb7984838acbf28bfba9c030f8b74f0 (patch) | |
tree | 4f449d929b5df9e126e839f388ff0fd2b52028a0 /drivers/pnp/pnpacpi/rsparser.c | |
parent | 6f1f3d0ab5c3eeea9f04486481c25e9afdfa26c5 (diff) | |
parent | b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/mtd/mtdcore.c
Pull in the bdi fixes and ARM platform changes that other outstanding
patches depend on.
Diffstat (limited to 'drivers/pnp/pnpacpi/rsparser.c')
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 54514aa35b09..100e4d9372f1 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/acpi.h> | 24 | #include <linux/acpi.h> |
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/pnp.h> | 26 | #include <linux/pnp.h> |
27 | #include <linux/slab.h> | ||
27 | #include "../base.h" | 28 | #include "../base.h" |
28 | #include "pnpacpi.h" | 29 | #include "pnpacpi.h" |
29 | 30 | ||
@@ -279,6 +280,7 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | |||
279 | struct acpi_resource_address64 addr, *p = &addr; | 280 | struct acpi_resource_address64 addr, *p = &addr; |
280 | acpi_status status; | 281 | acpi_status status; |
281 | int window; | 282 | int window; |
283 | u64 len; | ||
282 | 284 | ||
283 | status = acpi_resource_to_address64(res, p); | 285 | status = acpi_resource_to_address64(res, p); |
284 | if (!ACPI_SUCCESS(status)) { | 286 | if (!ACPI_SUCCESS(status)) { |
@@ -287,20 +289,19 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | |||
287 | return; | 289 | return; |
288 | } | 290 | } |
289 | 291 | ||
292 | /* Windows apparently computes length rather than using _LEN */ | ||
293 | len = p->maximum - p->minimum + 1; | ||
290 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; | 294 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; |
291 | 295 | ||
292 | if (p->resource_type == ACPI_MEMORY_RANGE) | 296 | if (p->resource_type == ACPI_MEMORY_RANGE) |
293 | pnpacpi_parse_allocated_memresource(dev, | 297 | pnpacpi_parse_allocated_memresource(dev, p->minimum, len, |
294 | p->minimum, p->address_length, | ||
295 | p->info.mem.write_protect, window); | 298 | p->info.mem.write_protect, window); |
296 | else if (p->resource_type == ACPI_IO_RANGE) | 299 | else if (p->resource_type == ACPI_IO_RANGE) |
297 | pnpacpi_parse_allocated_ioresource(dev, | 300 | pnpacpi_parse_allocated_ioresource(dev, p->minimum, len, |
298 | p->minimum, p->address_length, | ||
299 | p->granularity == 0xfff ? ACPI_DECODE_10 : | 301 | p->granularity == 0xfff ? ACPI_DECODE_10 : |
300 | ACPI_DECODE_16, window); | 302 | ACPI_DECODE_16, window); |
301 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) | 303 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) |
302 | pnpacpi_parse_allocated_busresource(dev, p->minimum, | 304 | pnpacpi_parse_allocated_busresource(dev, p->minimum, len); |
303 | p->address_length); | ||
304 | } | 305 | } |
305 | 306 | ||
306 | static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, | 307 | static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, |
@@ -308,21 +309,21 @@ static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, | |||
308 | { | 309 | { |
309 | struct acpi_resource_extended_address64 *p = &res->data.ext_address64; | 310 | struct acpi_resource_extended_address64 *p = &res->data.ext_address64; |
310 | int window; | 311 | int window; |
312 | u64 len; | ||
311 | 313 | ||
314 | /* Windows apparently computes length rather than using _LEN */ | ||
315 | len = p->maximum - p->minimum + 1; | ||
312 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; | 316 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; |
313 | 317 | ||
314 | if (p->resource_type == ACPI_MEMORY_RANGE) | 318 | if (p->resource_type == ACPI_MEMORY_RANGE) |
315 | pnpacpi_parse_allocated_memresource(dev, | 319 | pnpacpi_parse_allocated_memresource(dev, p->minimum, len, |
316 | p->minimum, p->address_length, | ||
317 | p->info.mem.write_protect, window); | 320 | p->info.mem.write_protect, window); |
318 | else if (p->resource_type == ACPI_IO_RANGE) | 321 | else if (p->resource_type == ACPI_IO_RANGE) |
319 | pnpacpi_parse_allocated_ioresource(dev, | 322 | pnpacpi_parse_allocated_ioresource(dev, p->minimum, len, |
320 | p->minimum, p->address_length, | ||
321 | p->granularity == 0xfff ? ACPI_DECODE_10 : | 323 | p->granularity == 0xfff ? ACPI_DECODE_10 : |
322 | ACPI_DECODE_16, window); | 324 | ACPI_DECODE_16, window); |
323 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) | 325 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) |
324 | pnpacpi_parse_allocated_busresource(dev, p->minimum, | 326 | pnpacpi_parse_allocated_busresource(dev, p->minimum, len); |
325 | p->address_length); | ||
326 | } | 327 | } |
327 | 328 | ||
328 | static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, | 329 | static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, |