diff options
-rw-r--r-- | drivers/pnp/core.c | 8 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 1 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/core.c | 1 | ||||
-rw-r--r-- | include/linux/pnp.h | 2 |
4 files changed, 12 insertions, 0 deletions
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c index d8d7554..3e20b1cc 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c @@ -23,6 +23,14 @@ static LIST_HEAD(pnp_protocols); LIST_HEAD(pnp_global); DEFINE_SPINLOCK(pnp_lock); +/* + * ACPI or PNPBIOS should tell us about all platform devices, so we can + * skip some blind probes. ISAPNP typically enumerates only plug-in ISA + * devices, not built-in things like COM ports. + */ +int pnp_platform_devices; +EXPORT_SYMBOL(pnp_platform_devices); + void *pnp_alloc(long size) { void *result; diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 7eb8275..a005487 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -285,6 +285,7 @@ static int __init pnpacpi_init(void) acpi_get_devices(NULL, pnpacpi_add_device_handler, NULL, NULL); pnp_info("PnP ACPI: found %d devices", num); unregister_acpi_bus_type(&acpi_pnp_bus); + pnp_platform_devices = 1; return 0; } subsys_initcall(pnpacpi_init); diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index b71aff2..3a201b7 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c @@ -570,6 +570,7 @@ static int __init pnpbios_init(void) /* scan for pnpbios devices */ build_devlist(); + pnp_platform_devices = 1; return 0; } diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 00dae5b..2a1897e 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -364,6 +364,7 @@ int pnp_add_device(struct pnp_dev *dev); int pnp_device_attach(struct pnp_dev *pnp_dev); void pnp_device_detach(struct pnp_dev *pnp_dev); extern struct list_head pnp_global; +extern int pnp_platform_devices; /* multidevice card support */ int pnp_add_card(struct pnp_card *card); @@ -411,6 +412,7 @@ static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; } static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { ; } +#define pnp_platform_devices 0 /* multidevice card support */ static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; } |