From 8f81dd149806bc53c68c92f34d61f88427079039 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Tue, 8 May 2007 00:35:54 -0700 Subject: 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 Cc: Keith Owens Cc: Len Brown Cc: Adam Belay Cc: Matthieu CASTET Cc: Jean Tourrilhes Cc: Matthew Garrett Cc: Ville Syrjala Cc: Russell King Cc: Samuel Ortiz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/pnp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/pnp.h') 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); 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; } -- cgit v1.2.3-59-g8ed1b