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 d8d75541552c..3e20b1cc7778 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c | |||
@@ -23,6 +23,14 @@ static LIST_HEAD(pnp_protocols); | |||
23 | LIST_HEAD(pnp_global); | 23 | LIST_HEAD(pnp_global); |
24 | DEFINE_SPINLOCK(pnp_lock); | 24 | DEFINE_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 | */ | ||
31 | int pnp_platform_devices; | ||
32 | EXPORT_SYMBOL(pnp_platform_devices); | ||
33 | |||
26 | void *pnp_alloc(long size) | 34 | void *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 | } |
290 | subsys_initcall(pnpacpi_init); | 291 | subsys_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 | ||
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 00dae5ba128a..2a1897e6f937 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -364,6 +364,7 @@ int pnp_add_device(struct pnp_dev *dev); | |||
364 | int pnp_device_attach(struct pnp_dev *pnp_dev); | 364 | int pnp_device_attach(struct pnp_dev *pnp_dev); |
365 | void pnp_device_detach(struct pnp_dev *pnp_dev); | 365 | void pnp_device_detach(struct pnp_dev *pnp_dev); |
366 | extern struct list_head pnp_global; | 366 | extern struct list_head pnp_global; |
367 | extern int pnp_platform_devices; | ||
367 | 368 | ||
368 | /* multidevice card support */ | 369 | /* multidevice card support */ |
369 | int pnp_add_card(struct pnp_card *card); | 370 | int pnp_add_card(struct pnp_card *card); |
@@ -411,6 +412,7 @@ static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; } | |||
411 | static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; } | 412 | static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; } |
412 | static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; } | 413 | static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; } |
413 | static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { ; } | 414 | static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { ; } |
415 | #define pnp_platform_devices 0 | ||
414 | 416 | ||
415 | /* multidevice card support */ | 417 | /* multidevice card support */ |
416 | static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; } | 418 | static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; } |