aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-05-10 09:32:46 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-05-10 09:32:46 -0400
commit0ae28a35bcb7984838acbf28bfba9c030f8b74f0 (patch)
tree4f449d929b5df9e126e839f388ff0fd2b52028a0 /drivers/pnp
parent6f1f3d0ab5c3eeea9f04486481c25e9afdfa26c5 (diff)
parentb57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (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')
-rw-r--r--drivers/pnp/isapnp/core.c1
-rw-r--r--drivers/pnp/manager.c1
-rw-r--r--drivers/pnp/pnpacpi/core.c1
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c25
-rw-r--r--drivers/pnp/pnpbios/bioscalls.c1
-rw-r--r--drivers/pnp/pnpbios/rsparser.c1
-rw-r--r--drivers/pnp/resource.c5
7 files changed, 19 insertions, 16 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index e851160e14f0..918d5f044865 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -37,7 +37,6 @@
37#include <linux/module.h> 37#include <linux/module.h>
38#include <linux/kernel.h> 38#include <linux/kernel.h>
39#include <linux/errno.h> 39#include <linux/errno.h>
40#include <linux/slab.h>
41#include <linux/delay.h> 40#include <linux/delay.h>
42#include <linux/init.h> 41#include <linux/init.h>
43#include <linux/isapnp.h> 42#include <linux/isapnp.h>
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index 00fd3577b985..0a15664eef1c 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -12,7 +12,6 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/pnp.h> 14#include <linux/pnp.h>
15#include <linux/slab.h>
16#include <linux/bitmap.h> 15#include <linux/bitmap.h>
17#include <linux/mutex.h> 16#include <linux/mutex.h>
18#include "base.h" 17#include "base.h"
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 5314bf630bc4..f7ff628b7d94 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -21,6 +21,7 @@
21 21
22#include <linux/acpi.h> 22#include <linux/acpi.h>
23#include <linux/pnp.h> 23#include <linux/pnp.h>
24#include <linux/slab.h>
24#include <linux/mod_devicetable.h> 25#include <linux/mod_devicetable.h>
25#include <acpi/acpi_bus.h> 26#include <acpi/acpi_bus.h>
26 27
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
306static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, 307static 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
328static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, 329static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
index fc83783c3a96..8591f6ab1b35 100644
--- a/drivers/pnp/pnpbios/bioscalls.c
+++ b/drivers/pnp/pnpbios/bioscalls.c
@@ -11,7 +11,6 @@
11#include <linux/pnp.h> 11#include <linux/pnp.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/smp.h> 13#include <linux/smp.h>
14#include <linux/slab.h>
15#include <linux/kmod.h> 14#include <linux/kmod.h>
16#include <linux/completion.h> 15#include <linux/completion.h>
17#include <linux/spinlock.h> 16#include <linux/spinlock.h>
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index a5135ebe5f07..cb1f47bfee96 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -5,7 +5,6 @@
5#include <linux/ctype.h> 5#include <linux/ctype.h>
6#include <linux/pnp.h> 6#include <linux/pnp.h>
7#include <linux/string.h> 7#include <linux/string.h>
8#include <linux/slab.h>
9 8
10#ifdef CONFIG_PCI 9#ifdef CONFIG_PCI
11#include <linux/pci.h> 10#include <linux/pci.h>
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 5b277dbaacde..e3446ab8b563 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -8,6 +8,7 @@
8 */ 8 */
9 9
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/slab.h>
11#include <linux/errno.h> 12#include <linux/errno.h>
12#include <linux/interrupt.h> 13#include <linux/interrupt.h>
13#include <linux/kernel.h> 14#include <linux/kernel.h>
@@ -210,6 +211,8 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res)
210 if (tres->flags & IORESOURCE_IO) { 211 if (tres->flags & IORESOURCE_IO) {
211 if (cannot_compare(tres->flags)) 212 if (cannot_compare(tres->flags))
212 continue; 213 continue;
214 if (tres->flags & IORESOURCE_WINDOW)
215 continue;
213 tport = &tres->start; 216 tport = &tres->start;
214 tend = &tres->end; 217 tend = &tres->end;
215 if (ranged_conflict(port, end, tport, tend)) 218 if (ranged_conflict(port, end, tport, tend))
@@ -270,6 +273,8 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res)
270 if (tres->flags & IORESOURCE_MEM) { 273 if (tres->flags & IORESOURCE_MEM) {
271 if (cannot_compare(tres->flags)) 274 if (cannot_compare(tres->flags))
272 continue; 275 continue;
276 if (tres->flags & IORESOURCE_WINDOW)
277 continue;
273 taddr = &tres->start; 278 taddr = &tres->start;
274 tend = &tres->end; 279 tend = &tres->end;
275 if (ranged_conflict(addr, end, taddr, tend)) 280 if (ranged_conflict(addr, end, taddr, tend))