aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-05-08 03:35:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:23 -0400
commit8f81dd149806bc53c68c92f34d61f88427079039 (patch)
treeae60b9f2485a44d68b91aa18bf0991e6cf1181f1 /drivers
parentcab9bdd14dd7d8091b0aac7877ae9f29724eb741 (diff)
PNP: notice whether we have PNP devices (PNPBIOS or PNPACPI)
This series converts i386 and x86_64 legacy serial ports to be platform devices and prevents probing for them if we have PNP. This prevents double discovery, where a device was found both by the legacy probe and by 8250_pnp. This also prevents the serial driver from claiming IRDA devices (unless they have a UART PNP ID). The serial legacy probe sometimes assumed the wrong IRQ, so the user had to use "setserial" to fix it. Removing the need for setserial to make IRDA devices work seems good, but it does break some things. In particular, you may need to keep setserial from poking legacy UART stuff back in by doing something like "dpkg-reconfigure setserial" with the "kernel" option. Otherwise, the setserial-discovered "UART" will claim resources and prevent the IRDA driver from loading. This patch: If we can discover devices using PNP, we can skip some legacy probes. This flag ("pnp_platform_devices") indicates that PNPBIOS or PNPACPI is enabled and should tell us about builtin devices. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Keith Owens <kaos@ocs.com.au> Cc: Len Brown <lenb@kernel.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Jean Tourrilhes <jt@hpl.hp.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Russell King <rmk+serial@arm.linux.org.uk> Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pnp/core.c8
-rw-r--r--drivers/pnp/pnpacpi/core.c1
-rw-r--r--drivers/pnp/pnpbios/core.c1
3 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index d8d75541552c..3e20b1cc7778 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -23,6 +23,14 @@ static LIST_HEAD(pnp_protocols);
23LIST_HEAD(pnp_global); 23LIST_HEAD(pnp_global);
24DEFINE_SPINLOCK(pnp_lock); 24DEFINE_SPINLOCK(pnp_lock);
25 25
26/*
27 * ACPI or PNPBIOS should tell us about all platform devices, so we can
28 * skip some blind probes. ISAPNP typically enumerates only plug-in ISA
29 * devices, not built-in things like COM ports.
30 */
31int pnp_platform_devices;
32EXPORT_SYMBOL(pnp_platform_devices);
33
26void *pnp_alloc(long size) 34void *pnp_alloc(long size)
27{ 35{
28 void *result; 36 void *result;
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 7eb8275185b6..a00548799e98 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -285,6 +285,7 @@ static int __init pnpacpi_init(void)
285 acpi_get_devices(NULL, pnpacpi_add_device_handler, NULL, NULL); 285 acpi_get_devices(NULL, pnpacpi_add_device_handler, NULL, NULL);
286 pnp_info("PnP ACPI: found %d devices", num); 286 pnp_info("PnP ACPI: found %d devices", num);
287 unregister_acpi_bus_type(&acpi_pnp_bus); 287 unregister_acpi_bus_type(&acpi_pnp_bus);
288 pnp_platform_devices = 1;
288 return 0; 289 return 0;
289} 290}
290subsys_initcall(pnpacpi_init); 291subsys_initcall(pnpacpi_init);
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index b71aff21b3fc..3a201b77b963 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -570,6 +570,7 @@ static int __init pnpbios_init(void)
570 /* scan for pnpbios devices */ 570 /* scan for pnpbios devices */
571 build_devlist(); 571 build_devlist();
572 572
573 pnp_platform_devices = 1;
573 return 0; 574 return 0;
574} 575}
575 576