diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/Kconfig | 13 | ||||
-rw-r--r-- | drivers/pnp/core.c | 3 | ||||
-rw-r--r-- | drivers/pnp/isapnp/Kconfig | 2 | ||||
-rw-r--r-- | drivers/pnp/isapnp/core.c | 2 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/Kconfig | 2 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/core.c | 3 |
6 files changed, 10 insertions, 15 deletions
diff --git a/drivers/pnp/Kconfig b/drivers/pnp/Kconfig index 1959cef8e9de..821933f9aa57 100644 --- a/drivers/pnp/Kconfig +++ b/drivers/pnp/Kconfig @@ -2,11 +2,9 @@ # Plug and Play configuration # -menu "Plug and Play support" - depends on HAS_IOMEM - -config PNP +menuconfig PNP bool "Plug and Play support" + depends on HAS_IOMEM depends on ISA || ACPI ---help--- Plug and Play (PnP) is a standard for peripherals which allows those @@ -22,15 +20,15 @@ config PNP If unsure, say Y. +if PNP + config PNP_DEBUG bool "PnP Debug Messages" - depends on PNP help Say Y if you want the Plug and Play Layer to print debug messages. This is useful if you are developing a PnP driver or troubleshooting. comment "Protocols" - depends on PNP source "drivers/pnp/isapnp/Kconfig" @@ -38,5 +36,4 @@ source "drivers/pnp/pnpbios/Kconfig" source "drivers/pnp/pnpacpi/Kconfig" -endmenu - +endif # PNP diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c index 3e20b1cc7778..8e7b2dd38810 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c @@ -35,12 +35,11 @@ void *pnp_alloc(long size) { void *result; - result = kmalloc(size, GFP_KERNEL); + result = kzalloc(size, GFP_KERNEL); if (!result){ printk(KERN_ERR "pnp: Out of Memory\n"); return NULL; } - memset(result, 0, size); return result; } diff --git a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig index 578651eeb4b0..f1ef36673ad4 100644 --- a/drivers/pnp/isapnp/Kconfig +++ b/drivers/pnp/isapnp/Kconfig @@ -3,7 +3,7 @@ # config ISAPNP bool "ISA Plug and Play support" - depends on PNP && ISA + depends on ISA help Say Y here if you would like support for ISA Plug and Play devices. Some information is in <file:Documentation/isapnp.txt>. diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index a0b158704ca1..914d00c423ad 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -370,8 +370,6 @@ static int __init isapnp_read_tag(unsigned char *type, unsigned short *size) #if 0 printk(KERN_DEBUG "tag = 0x%x, type = 0x%x, size = %i\n", tag, *type, *size); #endif - if (type == 0) /* wrong type */ - return -1; if (*type == 0xff && *size == 0xffff) /* probably invalid data */ return -1; return 0; diff --git a/drivers/pnp/pnpbios/Kconfig b/drivers/pnp/pnpbios/Kconfig index fab848cae89d..b986d9fa3b9a 100644 --- a/drivers/pnp/pnpbios/Kconfig +++ b/drivers/pnp/pnpbios/Kconfig @@ -3,7 +3,7 @@ # config PNPBIOS bool "Plug and Play BIOS support (EXPERIMENTAL)" - depends on PNP && ISA && X86 && EXPERIMENTAL + depends on ISA && X86 && EXPERIMENTAL default n ---help--- Linux uses the PNPBIOS as defined in "Plug and Play BIOS diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index 3a201b77b963..ed112ee16012 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c @@ -147,7 +147,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info) info->location_id, info->serial, info->capabilities); envp[i] = NULL; - value = call_usermodehelper (argv [0], argv, envp, 0); + value = call_usermodehelper (argv [0], argv, envp, UMH_WAIT_EXEC); kfree (buf); kfree (envp); return 0; @@ -160,6 +160,7 @@ static int pnp_dock_thread(void * unused) { static struct pnp_docking_station_info now; int docked = -1, d = 0; + set_freezable(); while (!unloading) { int status; |