Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54830
b: refs/heads/master
c: 8f81dd1
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Linus Torvalds committed May 8, 2007
1 parent 59a60af commit aa21750
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cab9bdd14dd7d8091b0aac7877ae9f29724eb741
refs/heads/master: 8f81dd149806bc53c68c92f34d61f88427079039
8 changes: 8 additions & 0 deletions trunk/drivers/pnp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pnp/pnpacpi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pnp/pnpbios/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ static int __init pnpbios_init(void)
/* scan for pnpbios devices */
build_devlist();

pnp_platform_devices = 1;
return 0;
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/pnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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; }
Expand Down

0 comments on commit aa21750

Please sign in to comment.